I see lots of code like this:
local text = script.Parent.Text text = 'hi how ru'
What they are doing is assigning the text
variable the current Text
of the label/button/box.
They write that code thinking the text will change. But they are wrong. They are just reassigning the text variable.
To fix this:
local text = script.Parent text.Text = 'hi how ru'
The above code will change the text because of the .Text
added.
Just to clear things up. Don’t assign a variable a property that is not an object. For example:
local part = script.Parent
That line would be okay since it is referring to an object, the Parent
.
Closed as Not Constructive by Avigant and User#5423
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?