Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do you make GetPropertyChangedSignal for Values?

Asked by 2 years ago

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.

2 answers

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago
local Instance = path

Instance:GetPropertyChangedSignal("ValueName"):Connect(function()
    --do stuff
end)
0
it does'n work. if it helps, im using a BrickColorValue tymon4don 6 — 2y
0
It worked 100% for me, just make sure that it's a server script as it will not detect a change from the client. DietCokeTastesGood 111 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

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

Answer this question