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

How to make a clickable GUI?

Asked by 8 years ago

Can someone tell me how to make a clickable GUI for my game?Please, just someone! If you want to help me build I have placed a Team Create in my game! Thank you!

0
Use a TextButton. UniversalDreams 205 — 8y
0
Also, make sure to use either of the events that it uses: simply doing 'Button.Clicked' wont work. ;-; TheeDeathCaster 2368 — 8y
0
Why are people downvoting this? It's a fairly simple question. DrCylonide 158 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Put a TextButton in the GUI you want there to be a clickable button on. Then, put this script inside it:

script.Parent.MouseButton1Click:connect(function()
-- Code that activates when you click the button
end)

Calling MouseButton1Click detects when the user clicks the button, then runs a code. In this case, it is calling script.Parent which is the TextButton.

Ad

Answer this question