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

run gui not working?

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago
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)
Ad
Log in to vote
-1
Answered by
lomo0987 250 Moderation Voter
10 years ago

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)
Log in to vote
-1
Answered by
WXBZ 3
10 years ago
function onButtonClicked()
        script.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 32
end

script.Parent.MouseButton1Click:connect(onButtonClicked)

Answer this question