I'm using a (server)script in a gui to change the value of a NumberValue located in workspace. The gui's script runs fine but this script just doesn't seem to pick it up. The print() statement in line 2 doesn't even print anything!
Here's the code that doesn't seem to be working:
Values.Damage:GetPropertyChangedSignal("Value"):Connect(function(changed)
print("My damage has been changed!")
if Values.Damage.Value == 40 then
print("My damage has been upgraded!")
script.Parent.Mace2.Transparency = 0
script.Parent.Mace.Transparency = 1
elseif Values.Damage.Value == 55 then
print("My damage has been maxed!")
script.Parent.Mace3.Transparency = 0
script.Parent.Mace2.Transparency = 1
script.Parent.Mace3.OrinthianTrail.Enabled = true
end
end)
I need a solution that's not too hard on a computer, as my game is already kinda rough on my PC.

2 comments
how about remembering to put another bracket at the end of line 1?
No, the bracket is at the function's end. You don't close the bracket until you end the function.