Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Please help me with checking if a numberValue has changed every .1 second?

I really need help with this. I tried this:

v = script.Parent.Parent.Amount
while wait(0.1) do
script.Parent.Text = (v.Value)
end

It's supposed to check a numberValue ("Amount") every 0.1 second, but it doesn't refresh to check. Can somebody please help me?

2 answers

You can use the .Changed event instead, it would work much more efficiently.

v = script.Parent.Parent.Amount

v.Changed:connect(function()
	script.Parent.Text = v.Value
end)
v = script.Parent.Parent.Amount
while wait(0.1) do
script.Parent.Text = ""..v.Value..""
end

This needs to be in a string, so just do it this way and it should work. You just had a slight mistake.

This discussion is preserved as it was. New answers, comments, and votes are closed.