How do you go about updating Gui text every time a IntValue is changed

I want to be able to have the Gui text change to the IntValue number every time the IntValue Is changed.

It is a server script.
If you need to see the whole script just say so!

I have tried using while true do loops however it just breaks the script.

(Cash is the IntValue)

while true do
if Cash.Changed then
CashGuiClone.Background.Cash.Text = Cash.Value
wait(2)
end
end
1 Like

The implementation is wrong.

Cash.Changed is a Event, not a value.

It should be like this:

Cash.Changed:Connect(function()
   CashGuiClone.Background.Cash.Text = Cash.Value
   wait(2)
end)
1 Like
IntValue.Changed:Connect(function(NewValue)
	print(NewValue)
end)

Don’t forget about the event’s parameter. For ValueBase instances it represents the new value of its “Value” property.

2 Likes