What is the generic format to get a function to run only when a certain object's property is changed? This would be extremely useful to me if it even exists. For instance, what it I wanted a sound to play every time a brick changed color? Thanks so much in advance.
✓ ANSWER ACCEPTED
How to Make A Function Run On Changed Properties?
1 answer
✓ Accepted answer
You can use Instance:GetPropertyChangedSignal for the required functionality:
part:GetPropertyChangedSignal("Color"):Connect(function()
sound:Play()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
