Log in to vote

The cakes are multiply-ing by the second. what do i do?

Asked by 12 days ago
while true do
    local SmallCake = script.Parent
    local clonedSmall = SmallCake:Clone()
    clonedSmall.Parent = game.Workspace.Cakes.ClonedCakes
    clonedSmall.Position =, 831.309, -232.018) -- Where the cake will spawn


This is a script I made. So if i 'Play', or 'Run', this will create cakes falling out from the stove. But each time, the cakes get multiplied and I just waited like 30 sec but about 100 cakes are coming out on the stove every 3 sec! help me. *Supposed to come 1 cake in 3 sec

local sec = 'second' :D

The script is inside the Cake you're cloning. This in turn will create more scripts that have a while loop that clone's the script too. Smite me if i'm wrong. xPolarium 693 — 12d

1 answer

Log in to vote
Answered by 12 days ago

I'm pretty sure you are cloning the script. Indicating from the fact you are cloning script.Parent. You need to make sure to not clone the actual script if you do it will keep multiplying constantly over and over again.

Accept this as I commented at the same time. xPolarium 693 — 12d
You commented 2 minutes after i did ;) Kappa casper123123123 294 — 12d
Thanks guys! I forgot about that ComLBY_Dev 17 — 11d

Answer this question