Why does my character move randomly

I just put a weapon code for the player

and when I went to press play this happened Imgur: The magic of the Internet

Perhaps the gun is colliding with the player? Set the gun’s collision to Ignore Pawn.