Basically im trying to make a little puzzle game about a dream, however my script isnt working. I want to make it so when all parts glow the door will open, here is my attempt:
if game.Workspace.Puzzle1.MG.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG1.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG2.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG3.PointLight.Brightness == 40 then do
game.Workspace.Puzzle1.DoorA.Transparency = 1
end
Remove you "do" also It just makes you door invisible so here is a little better one. I have not tested it but seems ok. Also avoid using == as that is absolute try < or >. Cause sometimes roblox do .0001 stuff.
if game.Workspace.Puzzle1.MG.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG1.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG2.PointLight.Brightness == 40 and game.Workspace.Puzzle1.MG3.PointLight.Brightness == 40 then game.Workspace.Puzzle1.DoorA.Transparency = 1 game.Workspace.Puzzle1.DoorA.CanCollide = false end