ErnestaLightOn = false DanLight2On = false AquiziviteLight3On = false LovelyLightOn = false QuinnKennithLightOn = false if ErnestaLightOn == true and DanLightOn == true and AquiziviteLightOn == true and LovelyLightOn == true and QuinnKennithLightOn == true then local DarklightDoor = script.Parent if game.Workspace.ActivationLights.Material == Enum.Material.Neon then game.Workspace.DarklightDoor.Transparency = 1 game.Workspace.DarklightDoor.CanCollide = false game.Workspace.PlayOpening() end end end
If you know why this isn't working, post it in the answers. Anyways, here is an example of what I'm trying to do, so you can fix my script. I want the door to become transparent and CanCollide = false when ErnestaLight, DanLight, AquiziviteLIght, LovelyLight, and QuinnKennithLight are neon/activated. Please help! (For a myth game)
ErnestaLightOn = false DanLight2On = false AquiziviteLight3On = false LovelyLightOn = false QuinnKennithLightOn = false if ErnestaLightOn == true and DanLightOn == true and AquiziviteLightOn == true and LovelyLightOn == true and QuinnKennithLightOn == true then local DarklightDoor = script.Parent if game.Workspace.ActivationLights.Material == Enum.Material.Neon then game.Workspace.DarklightDoor.Transparency = 1 game.Workspace.DarklightDoor.CanCollide = false game.Workspace.PlayOpening() end end
As we can see the top variables don't match the bottom one. When scripting you have to remember you are working with a robot so everything must match as it won't just go and fix a simple problem for you.
ErnestaLightOn = false DanLightOn = false AquiziviteLightOn = false LovelyLightOn = false QuinnKennithLightOn = false if ErnestaLightOn == true and DanLightOn == true and AquiziviteLightOn == true and LovelyLightOn == true and QuinnKennithLightOn == true then local DarklightDoor = script.Parent if game.Workspace.ActivationLights.Material == Enum.Material.Neon then game.Workspace.DarklightDoor.Transparency = 1 game.Workspace.DarklightDoor.CanCollide = false game.Workspace.PlayOpening() end end
This is the fixed script unless you intentionally put the numbers into the script