Hello guys. I have this script that I created to make some sort of mini menu. Concept is simple, the player presses up and down to select different options in the menu. The problem is, whenever they click up and down the character also moves, and freezing the player isn't an option since I want the player to be able to walk around using W,A,S,D. I did some research, and implemented the following code at the top of my localscript:
local ContextActionService = game:GetService("ContextActionService")
ContextActionService:BindActionAtPriority("DisableArrowKeys", function()
return Enum.ContextActionResult.Sink
end, false, Enum.ContextActionPriority.High.Value, Enum.KeyCode.Up, Enum.KeyCode.Down, Enum.KeyCode.Left, Enum.KeyCode.Right)
It worked, and disabled the movement. Sadly, it also means it disabled all of the button inputs so the menu wouldn't work.
Question is, how would I manage to tweak this script to allow the button inputs, but disable the movement? Any help is appreciated, thank you!

3 comments
If you want to only enable PC Compatibility, then use UserInputService instead of ContextActionService. The main reason is that CAS is used for like, when you get into a car, and you press the H to horn. Are you trying to permanently enable the keys?
So I'm basically saying, are you using this temporarily or permanently?
Temporarily