Can I edit the functions bound to the arrow Keys?

With the default scripts, as you know, pressing up or down will make the character move, while left and right will rotate the camera.

I would like to have up and down have similar functions as left and right, plus, I would like to make left and right slower.

How can I do these changes?

2 Likes

You could probably just do this, and rebind the keys as desired:

Or for added flexibility using a combination of both that and what is suggested in the API:

Can I somehow get the functions from there?

No, I don’t think so. From what I know the easiest way would be to harness the key binds already provided or alternatively (and with more difficulty) program a movement system yourself and then key bind that to the keys you want.

You can overwrite default functions of keys with ContextActionService using the :BindActionAtPriority() function with Enum.ContextActionPriority.

Here is an example of overwriting the LeftArrow key:

local ContextActionService = game:GetService("ContextActionService")

local function example()
	print("test")
end

ContextActionService:BindActionAtPriority("example", example, false, Enum.ContextActionPriority.High.Value, Enum.KeyCode.Left)
1 Like