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

run gui not working?

StarterGui>ScreenGui>TextButton>Script this is where i put the script

function onClick(mouse)
script.Parent.Parent.Parent.Parent.Chara­cter.Humanoid.WalkSpeed = 32
end
script.Parent.MouseButton1Click:connect(­onClick)

this is the script itself, it doesn't seem to be working

3 answers

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)

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