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

Why isn't my Gui button working?

The button should be removed when it's clicked, and sets the player's walkspeed to 16.. At the moment it does nothing :/

Button = script.Parent -- close button
Button2 = script.Parent.Parent.Parent -- removes the gui

function onClick()
	script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Walkspeed = 16 -- sets player's walkspeed to 16
	Button2:Destroy() 


end 

Button.MouseButton1Click:connect(onClick) 

The script is inside an image button, inside a frame, inside a Gui which is inside StarterGui

1 answer

✓ Accepted answer

Change Walkspeed to WalkSpeed.

2 comments

0

Thank you! :)

0

In studio in the 'View' Tab, open the 'Output' window. This will (most of the time) find errors in syntax or stuff like that

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