local brick = script.Parent local onepos = brick["1"].Position local twopos = brick["2"].Position local threepos = brick["3"].Position local fourpos = brick["4"].Position local fivepos = brick["5"].Position local sixpos = brick["6"].Position local sevenpos = brick["7"].Position local eightpos = brick["8"].Position local oneori = brick["1"].Orientation local twoori = brick["2"].Orientation local threeori = brick["3"].Orientation local fourori = brick["4"].Orientation local fiveori = brick["5"].Orientation local sixori = brick["6"].Orientation local sevenori = brick["7"].Orientation local eightori = brick["8"].Orientation local RESET_SECONDS = 1 local isTouched = false -- Declare debounce variable function onTouch() if not isTouched then -- Check that debounce variable is not true isTouched = true -- Set variable to true wait(2) brick["1"].Anchored = false wait(.1) brick["2"].Anchored = false wait(.1) brick["3"].Anchored = false wait(.1) brick["4"].Anchored = false wait(.1) brick["5"].Anchored = false wait(.1) brick["6"].Anchored = false wait(.1) brick["7"].Anchored = false wait(.1) brick["8"].Anchored = false --return wait(2.5) brick["6"].ParticleEmitter.Enabled = true brick["8"].ParticleEmitter.Enabled = true wait(.1) brick["6"].ParticleEmitter.Enabled = false brick["8"].ParticleEmitter.Enabled = false brick["1"].Anchored = true brick["2"].Anchored = true brick["3"].Anchored = true brick["4"].Anchored = true brick["5"].Anchored = true brick["6"].Anchored = true brick["7"].Anchored = true brick["8"].Anchored = true brick["1"].Position = onepos wait(.1) brick["2"].Position = twopos wait(.1) brick["3"].Position = threepos wait(.1) brick["4"].Position = fourpos wait(.1) brick["5"].Position = fivepos wait(.1) brick["6"].Position = sixpos wait(.1) brick["7"].Position = sevenpos wait(.1) brick["8"].Position = eightpos wait(.1) brick["1"].Orientation = oneori wait(.1) brick["2"].Orientation = twoori wait(.1) brick["3"].Orientation = threeori wait(.1) brick["4"].Orientation = fourori wait(.1) brick["5"].Orientation = fiveori wait(.1) brick["6"].Orientation = sixori wait(.1) brick["7"].Orientation = sevenori wait(.1) brick["8"].Orientation = eightori wait(.1) wait(RESET_SECONDS) -- Wait for reset time duration isTouched = false -- Reset variable to false end end brick.PrimaryPart.Touched:connect(onTouch)