Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Key Mapping?

Asked by
OniiCh_n 410 Moderation Voter
10 years ago

Is there a way to change the 'W' and 'S' keys to perform different functions instead of walking in a certain direction? (Like set 'W' to jump and 'S' to crouch) How would I also map other keys besides the ones above?

1 answer

Log in to vote
0
Answered by 10 years ago

First of all i don't think its possible to change the wasd key events due to it being made from the roblox core area.

but you can make a jump event with the keys

first put a localscript inside the StarterGui.

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.KeyDown:connect(function(key)
    if string.lower(key) == "w" then
    Player.Character.Humanoid.Jump = true
    end
end)
Ad

Answer this question