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

why dont my shift to run script work? Help please.I did everything right but the script dont work.

Asked by 6 years ago

This is the script

local zeb=game:GetService("UserInputService")
zeb.InputBegan:connect(function(key)
if Input.Keycode=enum.Keycode.LeftShift then
game.Players.LocalPlayer.Humanoid.Walkspeed=50 else
game.Players.LocalPlayer.Humanoid.Walkspeed=25
end
zeb.InputEnded:connect(function()
game.Players.LocalPlayer.Humanoid.Walkspeed=25
end)
end)

it dont work..please help

1 answer

Log in to vote
0
Answered by 6 years ago
local player = script.Parent.Parent
local mouse = player:GetMouse()
local running = false


mouse.KeyDown:connect(function(key)
    if key == "0" then
        running = true
        player.Character.Humanoid.WalkSpeed = 32
end
end)
mouse.KeyUp:connect(function(key)
    if key == "0" then
        running = false player.Character.Humanoid.WalkSpeed = 16
end
end)

There, use that.

0
why did u enter this script into the player? User#20192 0 — 6y
0
and i want the most simple easy low lines solution..and u didnt even explain this User#20192 0 — 6y
0
^ Because you are accessing player's character's humanoid. So therefore, you insert the script inside the player. Axceed_Xlr 380 — 6y
0
What do you need explained? Point out parts / part of the script that you do not understand and Ill cut it down for you. Omega677 15 — 6y
Ad

Answer this question