local mouse = game.Players.LocalPlayer:GetMouse()
local h = game.Players.LocalPlayer.Character.Humanoid
mouse.KeyDown:connect (function (key)
print(key)
if key == "w" or key == "s" then
h.WalkSpeed = 0
elseif key == "a" or key == "d" then
h.WalkSpeed = 16
end
end)
What this script does is that avoids the player to walk forwards and backward, and SPECIFICLY left and right. It works perfectly. But if you hold "w" or "s" and hold "a" or "d" consecutively, your character starts walking diagnoly, wich as i said, the character can ONLY walk left and right. So please help me fix this script?
