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

How am I able to have a part that shows a StringValue's value?

Asked by 8 years ago

Alright, so I have this StringValue, and I want the part to show what the StringValue's value is, how am I able to do that?

Information you might need: The Part has a Surface GUI, with a TextLabel inside that, and then a LocalScript in the TextLabel. The 'InfoValue' is the StringValue.

Here's what I got so far:

local replicatedstorage = game:GetService('ReplicatedStorage')
local status = replicatedstorage:WaitForChild('InfoValue')

script.Parent.Text = status.Value
status.Changed:connect(function()
script.Parent.Text = status.Value
end)
0
It should work... Can I see the hierarchy you have? NinjoOnline 1146 — 8y
0
Also, when using .Changed, you can pass the value of "value", or anything really, between the parenthasis next to the function. And instead of doing status.Value, do value. SimplyRekt 413 — 8y
0
I just found out it works, though not on a Surface GUI? robloxturn 0 — 8y

Answer this question