In the console when i decrease value it just showing the " + " Console : > game.Players.tommy2100.leaderstats.Money.Value = game.Players.tommy2100.leaderstats.Money.Value - 250 Note: I have create a LocalScript and put into StarterGui
local plr = game.Players.LocalPlayer local stats = plr:WaitForChild("leaderstats") local money = stats:WaitForChild("Money") local gold = stats:WaitForChild("Gold") local rs = game:GetService("ReplicatedStorage") local sound = rs:WaitForChild("GetCash") local sound2 = rs:WaitForChild("GetGold") money.Changed:Connect(function() if money.Value + money.Value then print("+") elseif money.Value - money.Value then print("-") end end) gold.Changed:Connect(function() if gold.Value + gold.Value then print("+") elseif gold.Value - gold.Value then print("-") end end)
That isnt how 'if statements' work, when you put
if xyz - xyz then dostuff() end
It subtracts xyz from xyz and then checks if that isnt false or nil, if it isnt false or nil then it passes the 'if statement'. So it immeaditly goes through the first 'if statement' and never reaches the elseif.
Instead you should check how the value has changed since it was last set.
xyz1 = 0 xyz2 = xyz1 xyz1 = xyz1 + 1 if xyz1 > xyz2 then print("Value is higher!") elseif xyz1 < xyz2 then print("Value is lower") end