I am attempting to make something that clones a brick repeatedly on a timer. But it isn't working. Someone else's post on the DevForum said to move the script into a different brick and have it work from there but that isn't working either. I also tried turning it into a function and I am just very confused. Also I can't use Instance.New because the place that I am spawning from is a moving object. Here is my script:
local MarbleL = script.Parent.Parent.Parent.MarbleLeft:Clone() local Marble1 = script.Parent.Parent.Parent.MarbleLeft function CreateMarble() wait(1) Marble1:Clone() MarbleL.Parent = game.Workspace.TireMarbles MarbleL.Transparency = 0 MarbleL.CanCollide = true MarbleL:ClearAllChildren() print("Working") end while 1 < 5 do CreateMarble() end
I hope I formatted this right, thanks in advance for your help :) Edit: I only started scripting like 2 days ago so if my scripting is sloppy or bad that's probably why
replace line 9 with local MarbleL = Marble1:Clone()