Still have questions? Join our Discord server and get real time help.
Log in to vote

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

Asked by 8 months 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 1337 — 8mo

1 answer

Log in to vote
Answered by 8 months 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 1337 — 8mo
You commented 2 minutes after i did ;) Kappa casper123123123 359 — 8mo
Thanks guys! I forgot about that ComLBY_Dev 21 — 8mo

Answer this question