I'm trying to make a GetPropertyChangedSignal for values, so whenever the value updates the script will activate. I can't find anything that will help me with that. I tried doing it myself but it doesn't work.
COMMUNITY QUESTION
how do you make GetPropertyChangedSignal for Values?
2 answers
local Instance = path
Instance:GetPropertyChangedSignal("ValueName"):Connect(function()
--do stuff
end)
Hi! This is a script that I made. It works correctly. If you run the game and you are playing as client, and you change the Value and it doesn't print anything, it's because you are changing that on the client side, not on the server (this is a server script). Only go to current server and it should work. I tried to use the script in a local script, and it didn't work. Use a server script, or you can use a Remote Event if you really requires that.
local Value = game.Workspace.Value --Change to the ubication of your value
Value:GetPropertyChangedSignal("Value"):Connect(function()
print("It changed!")
end)
If it didn't work, maybe I can help you, only ask me for help. And if it worked please let me know :D
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
it does'n work. if it helps, im using a BrickColorValue
It worked 100% for me, just make sure that it's a server script as it will not detect a change from the client.