StarterGui>ScreenGui>TextButton>Script this is where i put the script
function onClick(mouse) script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 32 end script.Parent.MouseButton1Click:connect(onClick)
this is the script itself, it doesn't seem to be working
local player = script; repeat player = player.Parent until player:IsA('Player') --Get the Player. script.Parent.MouseButton1Click:connect(function() player.Character:WaitForChild('Humanoid').WalkSpeed = 32 --Set the Player's WalkSpeed to 32. end)
Try this. Tell me if this works for you.
function click() script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 32 end script.Parent.MouseButton1Down:connect(click)
function onButtonClicked() script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 32 end script.Parent.MouseButton1Click:connect(onButtonClicked)