✓ Accepted answer
Here's what you need to do:
local Infomation = script.Parent:WaitForChild("Infomation")
local Timer = game.ReplicatedStorage.Timer
Timer.Changed:connect(function()
Infomation.Text = Timer.Value
end
Here's a quick rundown of what changed.
First, I changed this top bit
local Infomation = script.Parent:WaitForChild("Infomation")
local replicated = game:GetService("ReplicatedStorage")
To this
local Infomation = script.Parent:WaitForChild("Infomation")
local Timer = game.ReplicatedStorage.Timer
You don't really need a variable that represents ReplicatedStorage, just a variable for the Timer itself.
Next, I changed this:
Infomation.Text = Timer.Value
to this:
Timer.Changed:connect(function()
Infomation.Text = Timer.Value
end
The issue before is that you only set the TextLabel's Text to the Timer's Value once. Therefore, it won't update. When you set something to the value of the Timer, it doesn't link them together in some sort of an automatic connection. Instead, what happens, is the Information's Text gets changed to the current Value of Timer.
What the new solution does is update Information's Text every time Timer's Changed event fires (which would be every time a property of Timer changes).
I hope this helped you. Good luck!
1 comment
Is this the full code? I don't think this is enough for SH to help you with.