Hey! I tried to check when a value changed but when i execute the script it simply dont do anything, the console dont prints anything too, What i did wrong?
IMPORTANT: Its a ServerScript
My code:
local CounterValue
local Stopped = false
local CounterTimeValue = GameValues:FindFirstChild("CounterTime")
CounterTimeValue.Changed:Connect(function(value)
print("Value Changed, New value: "..value)
CounterValue = value
end)
Using :GetPropertyChangedSignal() on a ValueBaseInstance is a terrible idea, it just overcomplicates what is already there (which is the .Changed Value)
Be sure that the Server is made aware of any changes to the value so it fires, otherwise it wont fire at all.
You must also make sure the Script is Enabled, and is in a place where it can run (for example ServerScriptService)