I have a script here which is supposed to enable the floodlights scripts and prompt to allow it being used, the prompt for the generator however has to be triggered in order to allow players to use the floodlight.
After wait(10) it doesnt seem to change the colours, or disable the scripts. Anyone know why?
local FLS1 = script.Parent.Floodlights.Floodlight.Body.Button.Prompt.ProximityPrompt.Script2
local FLPR = script.Parent.Floodlights.Floodlight.Body.Button.Prompt.ProximityPrompt
-- FLS1 = FloodLight Script 1
-- FLPR = FloodLight Proximity Prompt
local GENPR = script.Parent.Generator.Prompt.ProximityPrompt
-- FLPR = Generator Proximity Prompt
local FLP1 = script.Parent.Floodlights.Floodlight.Right.Light
local FLP2 = script.Parent.Floodlights.Floodlight.Right.Light
GENPR.Triggered:Connect(function(on)
-- Generator power is on, floodlight can be used
FLPR.Enabled = true
FLS1.Enabled = true
GENPR.Enabled = false
wait(10) -- After 100 seconds, all turns off
FLS1.Enabled = false
FLPR.Enabled = false
GENPR.Enabled = true
FLP1.SurfaceLight.Enabled = false
FLP1.Color = Color3.fromRGB(65,65,65)
FLP2.SurfaceLight.Enabled = false
FLP2.Color = Color3.fromRGB(65,65,65)
end)