I have 3 "Sounder"s in workspace, only 1 of them works in the following functions :
(look for green text to explain what is happening)
Main Script:
local check = game.Workspace:GetChildren()
function click()
for i,v in pairs (check) do
if v.Name == "Sounders" then
game.Workspace.Panel.Status.Value = 1
v.Sound.Sound:Play() ** -- Only 1 sounder players music here, when 3 should**
game.Workspace.Panel.LightSync.Value = true
p.Reason.Text = "Alarm : Pull Station"
p.Silence.Text = "** SILENCE ALARM **"
p2.ACK.ClickDetector.MaxActivationDistance = 32
p2.SILENCE.ClickDetector.MaxActivationDistance = 32
end
end
function check1()
if game.Workspace.Panel.LightSync.Value == true then
for i,v in pairs(check) do
if v.Name == "Sounder" then
repeat
wait(0.4)
v.Sound.PointLight.Enabled = true ** -- Only 1 sounder flashes the lights, when 3 should**
wait(0.4)
v.Sound.PointLight.Enabled = false
until game.Workspace.Panel.Status.Value == 0
end
end
end
end
game.Workspace.Panel.LightSync.Changed:connect(check1)
