Intro Song working in one game and the other it doesn't

Hello there!

I have a script where it works on one game but in the other it doesnt. I made sure to give permissions but it’s still not working.

Script:

local songIds = {"9616160367","9616159629","9616158066","9616165516","9616164972","9662147992","9616208762","9616161750","9616232668","9616164122","9616162852"}

local loadedSong = {}

for _,songId in pairs(songIds) do
	local song = Instance.new("Sound")
	song.SoundId = "rbxassetid://"..songId
	song.Parent = script
	song.Volume = 0.2
	song.PlayOnRemove = true
	song.Name = songId
	loadedSong[songId] = song
end

local songs = {
	[14253378] = {
		[14] = "9662147992",
		[13] = "9616159629",
		[9] = "9616158066",
		[5] = "9616165516",
		[4] = "9616164972",
	},
	[14243751] = {
		[16] = "9659803860",
	},
	[14252305] = {
		[11] = "9616208762",
		[10] = "9616161750",
		[9] = "9616232668"
	},
	[14252276] = {
		[11] = "9616164122",
	},
	[14401043] = {
		[7] = "9616162852",
		[6] = "9616162852",
		[5] = "9616162852",
		[4] = "9616162852",
		[3] = "9616162852",
		[2] = "9616162852",
		[1] = "9616162852",
	},
}
function playSong(id)
	wait(1)
	if loadedSong[id] then
		if loadedSong[id].IsLoaded then
			local song = loadedSong[id]:Clone()
			song.Parent = game:GetService("SoundService")
			song:Destroy()
		else
			playSong(id)
			wait(1)
		end
	else
		playSong(id)
		wait(1)
	end
end

game:GetService("Players").PlayerAdded:Connect(function(player)
	if (songs[14253378][player:GetRankInGroup(14253378)]) then
		playSong(songs[14253378][player:GetRankInGroup(14253378)])
	elseif (songs[14243751][player:GetRankInGroup(14243751)]) then
		playSong(songs[14243751][player:GetRankInGroup(14243751)])
	elseif (songs[14252305][player:GetRankInGroup(14252305)]) then
		playSong(songs[14252305][player:GetRankInGroup(14252305)])
	elseif (songs[14252276][player:GetRankInGroup(14252276)]) then
		playSong(songs[14252276][player:GetRankInGroup(14252276)])
	elseif (songs[14401043][player:GetRankInGroup(14401043)]) then
		playSong(songs[14401043][player:GetRankInGroup(14401043)])
	end
end)
1 Like

Both games are owned by you and are not team create?

Both the scripts are server scripts and in the same location?

1 Like

Its a group game and yep so Idk what the issue is.

1 Like

Both games are owned by the same group?

1 Like

One is by me and the other is my friend’s

I think that is the issue. You may need to reupload the audio into the other group instead.

1 Like

I did that, but it’s still the same issue.

If they dont own the audio then the other group cannot use the audio…unless this is roblox audio.

1 Like

I uploaded it under my group’s audio

If you reuploaded the audio they would have different audio ids…so u need to put those in the script for that game.

1 Like

Yea I did but still it’s the same issue

The one that doesn’t work…what do the errors say in the output window?

That’s the issue, I have a lot of errors so I wouldn’t know.

1 Like

Show a screen capture of it so we can help.

1 Like

Basically I join and nothing happens.