What do you add to make it so it checks how long the light is on. Thanks.
-- ProductOfDevs local battery = 100 function onClicked() if battery ~= 0 then if script.Parent.PointLight.Enabled == false then script.Parent.Sound:Play() script.Parent.PointLight.Enabled = true script.Parent.Material = 'Neon' elseif script.Parent.PointLight.Enabled == true then script.Parent.Sound:Play() script.Parent.PointLight.Enabled = false script.Parent.Material = 'Sand' end end end script.Parent.ClickDetector.MouseClick:Connect(onClicked)
the only thing I can say is a number value and a script that changes the value +1 every second then an if statement checking what the numbers on?