So... I made this script to dim lights that are all together in a folder. I want to dim all the lights at the same time (making them invisible, so a non-neon duplication of the lights becomes visible), but for some reason, the script dims one light at a time. Could somebody help me with this?
This is my script:
for name, child in pairs(script.Parent.Parent.Preps.L:GetChildren()) do
if child:IsA("BasePart") then
local value = 0
for i = 1, 20 do
value = value + 0.05
child.Transparency = value
wait(0.05)
end
end
end

2 comments
Use coroutine or spawn
its bc ur using a numeric for loop which yields