Ive tried to add when clicked functions but it still does not work. Please help.
COMMUNITY QUESTION
How can I make a screen gui button it changes the text by +1?
1 answer
i think this is the simple example for you as a reference
local button = --Your Button
button.MouseButton1Click:Connect(function() --When the button was clicked
local x
local text = --Your Text
x = x+1
text.Text = x
end)
2 comments
0
Calling the text variable inside the MouseButton1Click is unnecessary. You can put it outside the event, There's a term called DRY (Don't Repeat Yourself).
0
This did not work.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
you want a textbutton to add by one everytime a player clicks on it?
Yes I do for everyone that clicks on it.
so if one person clicks you want the whole server to get a + 1 on the text?
yes