Please help, it says a bool value error when there was no mistake in the script?
Asked by
5 years ago Edited 5 years ago
local spotlightorange = workspace.OrangeLightSignal.SpotLight
local spotlightred = workspace.RedLightSignal.SpotLight
local spotlightgreen = workspace.GreenLightSignal.SpotLight
local function turnGreen()
workspace:WaitForChild("GreenLightSignal").Material = Enum.Material.Neon
spotlightgreen.Enabled = true
workspace:WaitForChild("OrangeLightSignal").Material = Enum.Material.SmoothPlastic
spotlightorange.Enabled = false
wait(8)
end
local function turnOrange()
workspace:WaitForChild("RedLightSignal").Material = Enum.Material.SmoothPlastic
spotlightred.Enabled = false
workspace:WaitForChild("OrangeLightSignal").Material = Enum.Material.Neon
spotlightorange.Enabled = true
wait(8)
end
local function turnRed()
workspace:WaitForChild("OrangeLightSignal").Material = Enum.Material.SmoothPlastic
spotlightorange = false
workspace:WaitForChild("RedLightSignal").Material = Enum.Material.Neon
spotlightred.Enabled = true
wait(8)
end
local function turnFlashingOrange()
local OrangeLightSignal = workspace:WaitForChild("OrangeLightSignal")
workspace.GreenLightSignal.Material = Enum.Material.SmoothPlastic
OrangeLightSignal.Material = Enum.Material.Neon
spotlightorange.Enabled = true
wait(0.5)
OrangeLightSignal.Material = Enum.Material.SmoothPlastic
spotlightorange.Enabled = false
wait(0.5)
OrangeLightSignal.Material = Enum.Material.Neon
spotlightorange.Enabled = true
wait(0.5)
OrangeLightSignal.Material = Enum.Material.SmoothPlastic
spotlightorange.Enabled = false
wait(0.5)
OrangeLightSignal.Material = Enum.Material.Neon
spotlightorange.Enabled = true
wait(0.5)
OrangeLightSignal.Material = Enum.Material.SmoothPlastic
spotlightorange.Enabled = false
wait(0.5)
OrangeLightSignal.Material = Enum.Material.Neon
spotlightorange.Enabled = true
wait(0.5)
OrangeLightSignal.Material = Enum.Material.SmoothPlastic
spotlightorange.Enabled = false
wait(0.5)
OrangeLightSignal.Material = Enum.Material.Neon
spotlightorange.Enabled = true
wait(0.5)
OrangeLightSignal.Material = Enum.Material.SmoothPlastic
spotlightorange.Enabled = false
end
while true do
wait(1)
turnOrange()
turnGreen()
turnFlashingOrange()
turnRed()
end