-- texan fixed for new ELS :))) 

seat = script.Parent.Parent--the car's vehicle seat. Currently can be any part

sound = seat.Parent.Sound
sirens = {}
for i,v in pairs (sound:GetChildren()) do
	if v:IsA("Sound") and v.Name ~= "horn" then
		table.insert(sirens,{playing=false,horn=v})
	end
end

function siren()
	local distto = seat.Values.siren.Value:find(",")+0
	local siren1 = seat.Values.siren.Value:sub(1,distto-1)
	local siren2 = seat.Values.siren.Value:sub(distto+0)
	for _,i in pairs (sirens) do
		if i.horn.Name ~= siren1 and i.horn.Name ~= siren2 then
			i.playing = false
			i.horn:Stop()
		end
		if i.horn.Name == siren1 or i.horn.Name == siren2 then
			if not i.playing then
				i.playing = true
				i.horn:Play()
			end
		end
	end
end
seat.Values.siren.Changed:connect(siren)
