so say out of 10 bricks, you choose one brick by math.random, and you want to destroy the 9 bricks that aren't that one brick. how would you say that in lua?
--First determine your set of bricks local bricks = workspace.Bricks:GetChildren() --Now chose one randomely local brick = bricks[math.random(1,#bricks)] --Iterate through the table and remove the index if it doesn't match 'brick' for _,v in next,bricks do if v ~= brick then v:Destroy() end end