✓ Accepted answer
You have unnecceessary string symbol (") on line after while true do:
text.Text = "????: "..Cash.Value"
-- should be:
text.Text = "????: "..Cash.Value -- here no "
Your script probably gives you time exhaustion error because you have while true do loop without a debounce, that means it will run infinitely with speed of sonic and crash your script, to prevent that you would use wait:
...
while true do
text.Text = '????: ' .. Cash.Value
wait(1)
end
But i have too much reputation to show you this method, GetPropertyChangedSignal is what you need, it's a function of Instance which returns an Event which fires when given Property changes, you would then connect it to the function so last part of your script would look like this:
...
local function Update()
text.Text = '????: ' .. Cash.Value
end
Cash:GetPropertyChangedSignal('Value'):Connect(Update)
Update()
3 comments
the question marks are supposed to be an emoji
screnshot please
i cant add a screen shot for some weird reason