I’m making a fighting game and I want the controls to be a typical fighting game so far I used contextactionservice to Unbind the W and S keys but I’m having difficulties changing the W key to Jump and when the S key is pressed crouch animation is plays and returns back to idle.
local ContextActionService =game:GetService("ContextActionService")
local FowardMovement = Enum.PlayerActions.CharacterForward
local BackwardMovement = Enum.PlayerActions.CharacterBackward
local JumpMovement = Enum.PlayerActions.CharacterJump
local function Sink()
return Enum.ContextActionResult.Sink
end
----Sink forward movement
ContextActionService:BindAction("moveForwardAction", Sink,false,FowardMovement)
----Sink backward movement
ContextActionService:BindAction("SinkmoveBackwardAction",Sink,false,BackwardMovement)
----Sink jump movement
ContextActionService:BindAction("SinkjumpAction",Sink,false,JumpMovement)