What are the movements called?

Hey dev’s! What are the movements called on roblox? I only know the Left And Right movements, but the S and W key’s i dont. Please Help.

script:

local player = game.Players.LocalPlayer
local RunService = game:GetService(“RunService”)
local ContextActionService = game:GetService(“ContextActionService”)

local jumping = false
local LeftValue, rightValue, downValue, upValue = 0, 0, 0, 0

local function OnLeft(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
LeftValue = 1
elseif inputState == Enum.UserInputState.End then
LeftValue = 0
end
end

local function OnRight(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
rightValue = 1
elseif inputState == Enum.UserInputState.End then
rightValue = 0
end
end

local function OnDown(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
downValue = 1
elseif inputState == Enum.UserInputState.End then
downValue = 0
end
end

local function OnUp(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
upValue = 1
elseif inputState == Enum.UserInputState.End then
upValue = 0
end
end

local function OnJump(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
jumping = true
elseif inputState == Enum.UserInputState.End then
jumping = false
end
end

local function OnUpdate()
if player.Character and player.Character:FindFirstChild(“Humanoid”) then
if jumping then
player.Character.Humanoid.Jump = true
end
local MoveDirection = rightValue - LeftValue
player.Character.Humanoid:Move(Vector3.new(MoveDirection,0,0), false)
end
end

RunService:BindToRenderStep(“Control”, Enum.RenderPriority.Input.Value, OnUpdate)

ContextActionService:BindAction(“Left”, OnLeft, true, Enum.KeyCode.A, Enum.KeyCode.Left, Enum.KeyCode.DPadLeft)
ContextActionService:BindAction(“Right”, OnRight, true, Enum.KeyCode.D, Enum.KeyCode.Right, Enum.KeyCode.DPadRight)
ContextActionService:BindAction(“Backward”, OnDown, true, Enum.KeyCode.S, Enum.KeyCode.Down, Enum.KeyCode.DPadDown) – [I am stuck on this one.]
ContextActionService:BindAction(“Jump”, OnJump, true, Enum.KeyCode.Space, Enum.KeyCode.Up ,Enum.KeyCode.ButtonA)

Is this what you mean?

Backwards and forwards.

Are you searching for character movement (which may not trigger if the WalkSpeed is 0) or UserInputService/ did the user press the key?

the one where if you press WASD you move. in this case Im Looking For W and S.

A is Left, D is Right, W is IDK and S is IDK

Try this! Hope it helps!


userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
	
	if input.UserInputType == Enum.UserInputType.Keyboard then  
		if input.KeyCode == Enum.KeyCode.W then  -- Change this to your key
   -- Do stuff in here
		end
	end
	  print(gameProcessedEvent) -- prints whether gameProcessedEvent is true or false
end)