I'm trying to make a tycoon, but the bricks keep piling on the sides eventually causing lag, I want any brick created by this script to be deleted/destroyed after existing for 10 seconds.
script.Parent.ClickDetector.MouseClick:connect(function()
local x = Instance.new("Part")
x.BrickColor = BrickColor.new("Institutional White")
x.Position = Vector3.new(-163, 4.7, 216.7)
x.Size = Vector3.new(1,1,1)
x.Parent = script.Parent.Parent
x.Name = "TycoonBrick"
end)
But I'm not sure how to do that.
