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

Why isn't my GUI button working?

Asked by
Seraine 103
9 years ago

When a player click the button, it closes the GUI and sets their walkspeed to 16. But at the moment the script only close the GUI...

function close()
script.Parent.Parent.Parent:Remove()
wait()
script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Walkspeed = 16
-- this script is inside a text button, inside a frame, inside a GUI, inside starterGui
end

script.Parent.MouseButton1Click:connect(close)

Answer this question