I'm trying this loop that executes a function that makes a brick invisible
local parts = script.Parent:GetChildren() local function blink(part) if part:IsA("BasePart") then for transparency = 0, 1, 0.2 do part.Transparency = part.Transparency + 0.2 if part.Transparency == 1 then part.CanCollide = false wait(2) part.Transparency = 0 part.CanCollide = true break end wait(1) end end end while true do for i, v in ipairs(parts) do blink(v) end end
It does go through every child in parts but it only works on one brick each time. I would like to know how to make a brick start turning invisible every so seconds instead of having it wait until the part is done executing the function