script.Parent.TextButton.MouseButton1Click.Text = "121"
What is wrong with MouseButton1Click?
2 answers
MouseButton1Click is a function. Therefore, you need to integrate it with the correct syntax. You should use it like this:
script.Parent.TextButton.MouseButton1Click:connect(function()
--Code
end)
or
function Click()
--Code
end
script.Parent.TextButton.MouseButton1Click:connect(Click)
So, in your case you're attempting to change the text of the TextButton. To do that, we'll use the function, and have it set up like this:
script.Parent.TextButton.MouseButton1Click:connect(function()
script.Parent.TextButton.Text = "121"
end)
That's all there is to it! So now, this will fire the function, and then change the text to "121".
Anyways, if you have any further problems/questions, please leave a comment below, and I'll see what I can do. Hope I helped :P
####-Dyler3
it has to be
script.Parent.TextButton.MouseButton1Click:connect(function()
script.Parent.TextButton.Text = "121"
end)
6 comments
Sorry i cant explain right now, I can just be on for a bit... :/
You need to close the parentheses for the function.
Oh right sorry!
:P
Dyler, I dont think the ":P" was necessary...
:P
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Does not work.
It's set up perfectly fine. You must have given us the wrong path to the textbutton or something...