2012 rzr800 stalling while driving

Hi there I’m new here I just bought a 12 rzr800s about a week ago I had it out last night and all of a sudden it just shut off I turned the key off and tried to start it it fired back up then drive a foot shut off again the park indicator wasn’t reading either just a bunch of lines any clue what might be the problem thanks