This is the code, can you make it vanish after 10 seconds?
function fire() local p = Instance.new("Part") p.Position = script.Parent.Position p.Size = Vector3.new(1,1,1) p.BrickColor = BrickColor.new(106) p.BottomSurface = 0 p.TopSurface = 0 p.Name = "TycoonBrick" p.Parent = script.Parent end while true do wait(2.5) --Alter Rate Of Drop fire() end
You can make it automatically disappear after 10 seconds using the Debris Service:
local deb = game:GetService("Debris") function fire() local p = Instance.new("Part") p.Position = script.Parent.Position p.Size = Vector3.new(1,1,1) p.BrickColor = BrickColor.new(106) p.BottomSurface = 0 p.TopSurface = 0 p.Name = "TycoonBrick" p.Parent = script.Parent deb:AddItem(p, 10) -- This is the only change necessary. end while true do wait(2.5) --Alter Rate Of Drop fire() end
If the Part it already gone (Destroyed or otherwise) when Debris is told to remove it, very simply nothing happens.