local ReplicatedStorage = game:GetService("ReplicatedStorage")
local status = ReplicatedStorage:WaitForChild("Status")
local text = script.Parent.Text
text = status.Value
status:GetPropertyChangedSignal("Value"):Connect(function()
text = status.Value
end)
No error, the value is changed but the text are not updating since the game started
Not totally sure but I think your ‘text’ variable may just be set to the string that was inside the GUI, instead of the actual property. Try:
...
local text = script.Parent
text.Text = status.Value
status:GetPropertyChangedSignal("Value"):Connect(function()
text.Text = status.Value
end)
Here all I did was get the GUI’s ‘Text’ property every time so that, instead of changing just the ‘text’ variable, it changes the actual value.
Hopefully I’m not horribly incorrect
As far as I can tell, what I previously said seems to be the solution. Currently, the Text seems to be not updating because local text is simply set as ‘Loading…’ (the string that was inside of the TextLabel) instead of the actual, changeable property. All you are doing by writing text = status.Value is changing the variable from ‘Loading…’ to status.Value. Not the actual GUI Text property.
You can test if this is correct by printing the value of text.
EDIT: I tested your exact code in studio and the solution is what I wrote.
for i, v in pairs(Players:GetPlayers()) do
if v.Character then
local status = v.PlayerGui:WaitForChild("StageSystemGui").MainFrame.Status
status.Text = player1.Name.. "Is the winner! (player 1)"
end
end