Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer
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.

4 comments

0

why did u enter this script into the player?

0

and i want the most simple easy low lines solution..and u didnt even explain this

0

^ Because you are accessing player's character's humanoid. So therefore, you insert the script inside the player.

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.