local Alarms = game.Workspace.Alarms
local strobeimage = game.Workspace.Alarms.FireAlarm.Strobe.Flasher.Strobe
local strobelight = game.Workspace.Alarms.FireAlarm.Strobe.Light
local IsPlayingAlarms = false
function onMouseClick()
if (IsPlayingAlarms) then return end -- Check if alarms are already playing.
for i, FireAlarm in pairs(Alarms:GetChildren()) do
coroutine.resume(coroutine.create(function() -- Thread the effects.
FireAlarm.horn.Sound:Play() -- Sound the alarm.
while (IsPlayingAlarms) -- Strobe effect until IsPlayingAlarms = false
wait(1)
strobeimage.Visible = true
strobelight.Enabled = true
wait(0.1)
strobelight.Enabled = false
strobeimage.Visible = false
end
FireAlarm.horn.Sound:Stop()
strobelight.Enabled = false
strobeimage.Visible = false
end))
end
end
Yes?