How would i go about disabling up/down movements?

So my camera is scripted to be like the camera in Line Runner (runner template premade by stuido, i think thats the name LOL). I want the up/down scripts to be disabled, then at some point undisabled when lets say a person defeats/ leaves a battle (the game is cuphead style). Any help is much appreciated.

Put this in StarterPlayerScripts:

local function Sink()
	return Enum.ContextActionResult.Sink
end
game.ContextActionService:BindAction("SinkFowardMovement", Sink, false, Enum.PlayerActions.CharacterForward)
game.ContextActionService:BindAction("SinkBackwardMovement", Sink, false, Enum.PlayerActions.CharacterBackward)

Keep in mind that you will have to have barriers so the player cannot touch an object and move with just A and D

1 Like