So the things is I pay a box to get a gun , the box cost actually 75 bucks (in game), the box work but when our currency is less than 75, the box still work and the thing that I want to do is when our currency is less than 75 then we cannot buy box until we get more than 75 .
My script is here :
function Oncliked(player)
local stats = player:findFirstChild("leaderstats")
local cost = stats:findFirstChild("Money")
if cost == nil then return false end
if cost.Value < 75 then return end --- It's the thing that I tried to break the script if we didn't have less than 75 buck
if cost.Value >= 75 then
cost.Value = cost.Value - 75
end
print("Enough Money")
ps: I cut only the currency part because I cannot post the entire script and the script is a bit in french because I speak french.

1 comment
Try other things like if cost.value > 75 then