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

How do I run a function everytime a value is changed?

I've tried doing this in a few different ways but I apparently didn't do something right.

8 comments

0

What kind of "value"? Provide more context?

1

Remember to give as much information as possible when asking questions or we can't give you the best possible answer.

1

The value of what? An instance (NumberValue, StringValue, etc.), a variable?

0

.Changed....

0

To vague.

0

Instance.Changed event fires every time a property of 'Instance' changes.

1 answer

✓ Accepted answer

there you go

the function changed do is that it check if something was changed in your object in this case the value object

value.changed:connect(function()

end

Changed

For better help provide more information!

//Filipalla

`

2 comments

0

value.changed:connect(function(), Changed should be capitalized first char, :connect() is deprecated, use :Connect() instead

0

i did not even know that why even only make it deprecated for changing to uppercase change it's anoying it still works but roblox can remove it at any time!

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