backup = script.Parent:Clone()
backup.Parent = nil
huma = script.Parent.Humanoid
n = 0.5
huma.Died:Connect(function()
n += n
print(n)
local lolipop = n
wait(5)
while lolipop > 0 do
backup.Parent = game.Workspace
lolipop = lolipop - 1
print(lolipop)
end
end)
COMMUNITY QUESTION
Why is "n" not adding it's self when i call it in a function?
1 answer
Because you did the arithmetic wrong, you don't add it directly since roblox wont know what to do, instead you would put it equal to it adding by itself, and if its still erroring I would suggest switching the n to a local n.
backup = script.Parent:Clone()
backup.Parent = nil
huma = script.Parent.Humanoid
n = 0.5
huma.Died:Connect(function()
n = n + n
print(n)
local lolipop = n
wait(5)
while lolipop > 0 do
backup.Parent = game.Workspace
lolipop = lolipop - 1
print(lolipop)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
i am right now in the middle of making a new wave system i will keep you updated if i can do it. if not ima remove this question.
n += n is same as n = n + n
yeah i can't do it