Hey! I’m pretty new to scripting, and I found this simple script for my build, but I want the parts to disappear after some time, everything I tried makes it so the part spawns 5 seconds after the other, but I want them to spawn continuously, and after some time they’ll disappear. Thanks!
Here’s the script:
local shapes = {
Enum.PartType.Ball,
Enum.PartType.Cylinder,
Enum.PartType.CornerWedge,
Enum.PartType.Block,
Enum.PartType.Wedge,
}
while wait() do
local thing = Instance.new("Part",game.Workspace)
thing.Position = script.Parent.Position
thing.BrickColor = BrickColor.random()
thing.Shape = shapes[math.random(1,#shapes)]
thing.Size = Vector3.new(1,1,1)
end