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

[SOLVED] Properties not properly changing?

Asked by
ohhel 2
6 years ago
Edited 6 years ago

I have been attempting to work on an inventory system but StringValues and text values aren't changing properly. Through a script it changes though looking at the value in the properties panel it hasn't changed.

0
Script? hiimgoodpack 2009 — 6y
0
For now I've just been testing with script.Parent.Title.Text = "SampleText". ohhel 2 — 6y
0
Remove the "." Lolamtic 63 — 6y
0
The dot was just a full stop for the sentence not actually in the script. ohhel 2 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

To change a StringValue:

myString = script.StringValue
myString.Value = "Hello"
print(myString.Value) --outputs Hello

To change a TextLabel:

myText = script.Parent.TextLabel
myText.Text = "Hello"
print(myText.Text) --outputs Hello

I suggest reading through the wiki to get a better understanding. Please accept my answer if this helped!

0
I know how to change textlabels but it's just not working at all. ohhel 2 — 6y
0
It might be a Studio issue, try reinstalling. PyccknnXakep 1225 — 6y
Ad
Log in to vote
0
Answered by
ohhel 2
6 years ago

Nevermind! I fixed the glitch by deleting it from the hierarchy and then inserting it back in, strange.

Answer this question