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.

4 comments

0

^

0

I had to figure this out myself through trial and error when I started coding. Was frustrating lol

0

lol same^ don’t want new scripters following in our footsteps

0

Another up-vote ^