I watched some youtube tutorials and made this script using the tag editor plugin and this video:https://www.youtube.com/watch?v=-oPE0PL2Zew
However my script still doesn't work.
I have a button and inside it this script:
local function onTouch(hit)
workspace.blackout.Disabled = false
end
script.Parent.Touched:Connect(onTouch)
and that works,what doesn't work is this:
local CollectionService = game:GetService("CollectionService")
local TaggedParts = CollectionService:GetTagged("light")
for _, TaggedParts in pairs(TaggedParts) do
TaggedParts.light.Enabled = false
end

3 comments
Code Block.
You have to tag objects with the "light" tag or else they obviously won't be recognized as tagged parts
I tagged them using the plugin