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

Why does this (not) work?

Asked by 8 years ago

If I say have a gui and I want to change the text through a script this works:

script.Parent.Text = "Blah"

And this does:

Words = script.Parent
Words.Text = "Blah"

But this does not:

Words = script.Parent.Text
Word = "Blah"

How come?

0
You would be resetting the variable. You could try adding a .Value to Words but that might not work. You might just have to live with it. I know, it's the end of the world. User#11440 120 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

Your indexing is wrong. The variable 'Word' is not located in the script, so it doesn't know what to do.

Words = script.Parent.Text
Words = "Blah"

0
Oops that's a mistake of just typing it in the question bar It doesnt work like that though TheScriptingAccount 90 — 8y
0
Edited answer AwsomeSpongebob 350 — 8y
0
^ I've edited it please take a look TheScriptingAccount 90 — 8y
0
Please, read my answer. AwsomeSpongebob 350 — 8y
Ad

Answer this question