I saw another post on here about this, and the solution was to use something like this:
local StringValue = game.StringValue StringValue.Value = "String"
instead of this:
local StringValue = game.StringValue.Value StringValue = "String"
but this won't work on my script. It doesn't seem to be able to see the string value, even though I'm 100% sure it's there. I made sure I spelled it right and everything. How do you change a stringvalue from a script?
Make a stringvalue in a service but not game.
Let's say you put a stringvalue in replicatedstorage
You don't do game.StringValue
local stringv = game.ReplicatedStorage:WaitForChild('StringValue')-- i put waitforchild because replicatedstorage takes time to load. stringv.Value = 'yes'
If you put it in Workspace, you do the same except referencing it differently
local stringv = game.Workspace.StringValue stringv.Value = 'yes'
local StringValue = Instance.new("StringValue") StringValue.Parent = game:GetService("ReplicatedStorage") StringValue.Name = "Anything you'd like." StringValue.Value = "Hey, guys!" --text before changing wait(10) --changed text after 10 seconds StringValue.Value = "Your text"
You can use this example to make your own script work! :)