Ok soo basically i have an intvalue in workspace and i have a textlabel on a part, i have this script inside of the textlabel
while true do wait(1) script.Parent.Text = game.Workspace.IntValue.Value end
it stays on the originally set value as on the studio, how do i fix this?
(i want it to change the textlabel text to the int value every second)
You're simply missing a +1 so your code would be:
while true do wait(1) game.Workspace.IntValue.Value = game.Workspace.IntValue.Value+1 script.Parent.Text = game.Workspace.IntValue.Value end
local value = game.Workspace.IntValue local tl = script.Parent tl.Text = value.Value value.Changed:Connect(function() wait() tl.Text = value.Value end)
if you want to change its value in the same script you can add a Coroutine
local value = game.Workspace.IntValue local tl = script.Parent tl.Text = value.Value local cor = corountine.wrap(function() while wait() do wait(1) value.Value = value.Value + 1 end end) value.Changed:Connect(function() wait() tl.Text = value.Value end) cor()