I'm trying to create a button whereupon being clicked, changes the transparency of multiple parts with the same values but it won't work, I'm not that great with scripting so i don't really know what I'm doing wrong
local Button = workspace.LightButton1 -- where the button is located
local Lights = workspace.Row1:GetChildren() -- where multiple lights are located (in a group)
Button.MouseButton1Down:Connect(function()
if Lights.Transparency == 0 then
Lights.Transparency = 1
elseif Lights.Transparency == 1 then
Lights.Transparency = 0
end
end)

4 comments
thank you for the help but I think i'm missing something due to it not responding, and in my output it gives me " MouseButton1Down is not a valid member of ClickDetector "Workspace.LightButton1.Switch1""
Yeah, I was wondering why you put MouseButton1Down. If you are using ClickDetector, just do Button.ClickDetector.MouseClick
Thanks for the guidance, it means a lot
np