When Comparing Number values the script does not want to do the operation
Here is my script:
-- shift is the value the script is watching
local startingValue = shift
shift:GetPropertyChangedSignal("Value"):Connect(function()
wait(0.5)
if startingValue.Value > shift.Value then
local startingValue = shift
print("Bigger")
elseif startingValue.Value < shift.Value then
local startingValue = shift
print("Smaller")
else
print("Nothing")
end
end)
so what happens when the number value changes is the output prints “Nothing”
Even though the number value has Changed to a greater value.
I am not sure what is realy happening, or what to call this.
I have tried to look for solutions no the wiki and the dev forums with little luck.
What the script does is that it checks a value every time it changes and tells me if the value has gotten bigger or smaller