Like the title says, the script worked fine before I added elseif (statistic.Value == statistic.Value+statistic.Value>=8) then statistic.Value = lastValue. What's wrong?
local xd = Instance.new("IntValue")
xd.Name = "Level"
xd.Parent = leaderstats
xd.Value = 1
local statistic = xd
local lastValue = statistic.Value
statistic:GetPropertyChangedSignal("Value"):connect(function()
if (statistic.Value < lastValue) then
statistic.Value = lastValue
elseif (statistic.Value == statistic.Value+statistic.Value>=8) then
statistic.Value = lastValue
return
end
lastValue = statistic.Value
end)
