Custom Controls [ WASD ]

Hello Roblox Developers!

I’m currently working on my game, and I want to implement a feature where players can only use the W key for movement and other keys like A, S, and D are disabled.

I’ve tried a few different approaches, but I’m having trouble effectively disabling the other keys while ensuring “W” still works properly for movement. I’m looking for a simple script or guidance on how to achieve this.

Here’s what I want:

  • Players can only move forward using the “W” key.
  • The keys “A,” “S,” and “D” should not perform any actions or affect movement.

Any help or code snippets would be greatly appreciated!

Thanks in advance for your assistance!

i Found somthing that works Perfetly!

local contextActionService = game:GetService("ContextActionService")

contextActionService:UnbindAction("moveBackwardAction")
contextActionService:UnbindAction("moveLeftAction")
contextActionService:UnbindAction("moveRightAction")

thanks to kexy123

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.