I want to check if a number value changed but i also want to check if it went up or down.
SUNMASS.Changed:Connect(function() if (SUNMASS.Value + (DEFAULTRADIUS - 1)) > DEFAULTRADIUS then local differance = (SUNMASS.Value + (DEFAULTRADIUS - 1)) - DEFAULTRADIUS RADIUS.Value = RADIUS.Value + differance end wait(0.5) end)
local sv = SUNMASS SUNMASS.Changed:Connect(function() if SUNMASS > sv then print("decreases") elseif SUNMASS < sv then print("increases") end end)
hi, back here! I figured it out. So we have to use a small formula that subtracts the changes value from the new value.
So likes this:
local function valueChanged(num) local determinatial = SUNMASS.Value - num if SUNMASS.Value < determinatial then return “bigger” else return “smaller” end end SUNMASS.Changed:Connect(valueChanged)