Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[SOLVED] Properties not properly changing?

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.

4 comments

0

Script?

0

For now I've just been testing with script.Parent.Title.Text = "SampleText".

0

Remove the "."

0

The dot was just a full stop for the sentence not actually in the script.

2 answers

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!

2 comments

0

I know how to change textlabels but it's just not working at all.

0

It might be a Studio issue, try reinstalling.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.