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

Gui script not working?

Asked by
FiredDusk 1466 Moderation Voter
9 years ago
TextButton = script.Parent

script.Parent.TextButton.MouseButton1Click:connect(function()
script.Parent.TextButton.Text  = "121"
end)

Text does not change when clicked

1 answer

Log in to vote
0
Answered by
dyler3 1510 Moderation Voter
9 years ago

I think that you just made a simple mistake in not using the variable you defined. it should be like this:

TextButton = script.Parent

TextButton.MouseButton1Click:connect(function()
    TextButton.Text  = "121"
end)

Anyways, I hope this helped. If you have any further problems/questions, please leave a comment below :P

-Dyler3

Ad

Answer this question