We use cookies on this site to enhance your user experience

Sep 04 2018, 1:39 PM PST

-- Movement function that is called when the player presses the move forward button
local function onMove(actionName, inputState)
	if inputState == Enum.UserInputState.Begin then
		-- If the player presses down the button, move forward
		player.Character.HumanoidRootPart.VectorForce.Force = forwardForceVector
	elseif inputState == Enum.UserInputState.End then
		-- If the player releases the button, stop moving 
		player.Character.HumanoidRootPart.VectorForce.Force = Vector3.new(0,0,0)