seat=script.Parent.Parent sound=seat.Parent.Sound sirens={}for k,f in pairs(sound:GetChildren())do if f:IsA("\083\111\117\110\100")and f.Name~="\104\111\114\110"then table.insert(sirens,{playing=false;horn=f})end end function siren()local k=seat.Values.siren.Value:find("\044")+0 local f=seat.Values.siren.Value:sub(1,k-1)local v=seat.Values.siren.Value:sub(k+0)for k,w in pairs(sirens)do if w.horn.Name~=f and w.horn.Name~=v then w.playing=false w.horn:Stop()end if w.horn.Name==f or w.horn.Name==v then if not w.playing then w.playing=true w.horn:Play()end end end end seat.Values.siren.Changed:connect(siren)

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)
