I am trying to make it so when you click a Button, it makes a PointLight go on and off for a set time, but I am stuck on the "else" part.
script.Parent.MouseButton1Click:connect(function()
if game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled == false then
while true do
game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled = true
wait(1)
game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled = false
end
else
game.Workspace["DJ Board (PRO)"].Lights.One.PointLight.Enabled = false
end
end)

1 comment
Now it only flashes once, but then get's stuck