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

How do you make a GUI Text button detect when a player clicks it?

Asked by
ghxstlvty 133
5 years ago

I need this so when they player clicks "Send Payment" to a customer it gives the employee a point. I currently have no script. But I have this line of code but won't know if it will recognize the player whole clicked.

"money.Value = money.Value + 1"

2 answers

Log in to vote
0
Answered by 5 years ago

You would use

https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Click

Please search for the answer first though, this was right when I searched up “roblox GUI click”

Ad
Log in to vote
0
Answered by 5 years ago

I would highly recommend you look into what functions are and how GUIs work. One You didn't have any form of scripting to indicate that the button was clicked. Two You have nothing that ends or starts the value so this script will probably still not work.

What to do Have a local script in your button then add this command at the beginning of it. It may not work for what your script wants but that is how I get a detection for a buttons clicks

script.Parent.MouseButton1Click:Connect(function(click)

Answer this question