I try to use for everytime, but I want to learn to use the while loop.Everytime I try t, it glitches the debounce.Any help?
function pizza(mouse)
if debounce == false then
debounce = true
local x = Instance.new("Part")
x.Shape = "Ball"
x.CanCollide = false
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Transparency = 0.7
x.Parent = Workspace
x.Size = Vector3.new(10, 10, 10)
x.Name = Player.Name
x.BrickColor = BrickColor.new("Black")
game.Debris:AddItem(x, 10)
y = Instance.new("BodyVelocity")
y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
y.velocity = Player.Character.Torso.CFrame.lookVector*160
x.Parent = Workspace
y.Parent = x
f = Instance.new("Fire", x)
f.Heat = 0
f.Size = 30
x.CFrame = Player.Character.Torso.CFrame*CFrame.new(0, 0, -10)
while x do
wait(0.1)
x.Size = x.Size+Vector3.new(10, 10, 10)
end
wait(1)
debounce = false
end
end
I can use the tool just once, then the debounce go infi.I think it's because x is true yet, even tho it should last 10 seconds.

1 comment
Thank you!