I found this script from the catalog:
repeat wait() until game.Players.LocalPlayer
Run = game.Players.LocalPlayer:GetMouse()
Run.KeyDown:connect(function(key) if key == "0" then print("Running Now") game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 40 end end)
Run.KeyUp:connect(function(key) if key == "0" then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 end end)
**I want to be able to toggle shift on(lock it)press only once(running) and shift second time to activate off (walking)
**
Well that script you found is using the Mouse.KeyDown event, that is deprecated. Do not use it. Use the ContextActionService or UserInputService to do this.
function run() local plr = game:GetService("Players").LocalPlayer local char = plr.Character if not char then char = plr.CharacterAdded:Wait() end local hum = char:WaitForChild"Humanoid" if hum.WalkSpeed == 40 then hum.WalkSpeed = 16 elseif hum.WalkSpeed ~= 16 and hum.WalkSpeed < 40 then -- anything can make a humanoid faster/slower hum.WalkSpeed = 40 end end game:GetService("ContextActionService"):BindAction("Run", run, false, Enum.KeyCode.LeftShift )