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

How do I make a script that changes the players walkspeed once they click a button on StarterGUI?

Asked by 5 years ago
--StarterGui.AnimationsGui.RunButton.LocalScript or ServerScript
--I made a script but it does not work please help
--I used a server script
function onClicked(run)
    if run then 
        game.LocalPlayer.WalkSpeed = 32
    end
end

1 answer

Log in to vote
1
Answered by 5 years ago

Try doing this, I haven't tested it yet, but it should work c:

function onClick(mouse)
script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 50 

end
script.Parent.MouseButton1Click:connect(onClick)


0
(You can always change the walkspeed at: script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 50 (Change 50 to another number, 16 is normal roblox speed.) jamielelystad 20 — 5y
0
Thanks! AwesomeMrBird -79 — 5y
0
Your welcome! jamielelystad 20 — 5y
Ad

Answer this question