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

Slider doesn't change value of walkspeed. Help?

while wait() do
	game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = script.Parent.Value.Value      
end

Is there anything wrong? I am making a slider and made this script but it doesn't seem to be working :/

4 comments

0

Use while true do and use a server script

0

Didn't work :<

0

Why are you using double ".Value"?

0

because the numbervalue is called value

1 answer

✓ Accepted answer

Make sure it is a Int Value and try to do this

game:GetService("RunService").Heartbeat:Connect(function()

    game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = script.Parent.Value.Value      
end)

Make sure it is in a local script Aswell

2 comments

0

I am gonna use gui to lua and it's gonna break this maybe?

0

Gui to lua? you can use this in gui's just change it to MouseButton1 If you were to use a Gui click the while wait() Causes more lag this Does not cause Lag But if you were to use the heartbeat to create parts if it were to create to many parts then it will Lag

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