Script wont play sounds in replicated storage

Why aren’t the songs playing?

hint = Instance.new("Hint")
hint.Parent = workspace
hint.Name = "Hint"
while true do
	songfolder = game.ReplicatedStorage.LobbyMusic:GetChildren()
	random = songfolder[math.random(1,2)]
	if random == 1 then
		game.ReplicatedStorage.LobbyMusic.OneStepAway:Play()
	end
	if random == 2 then
		game.ReplicatedStorage.LobbyMusic.TheEdge:Play()
	end
	wait(1)
	local it = 15
	while it > 0 do
		hint.Text = "Intermission("..it..")"
		wait(1)
		it = it - 1
	end
	wait(1)
	hint.Text = "Choosing a map..."
	wait(1)
	game.ReplicatedStorage.LobbyMusic.OneStepAway:Stop()
	game.ReplicatedStorage.LobbyMusic.TheEdge:Stop()
	local map = game.ServerStorage.Maps
	local  maps = game.ServerStorage.Maps:GetChildren()
	local randomgame = maps[math.random(1, #maps)]
	if randomgame == map["Map A"] then
		game.ReplicatedStorage.LobbyMusic.MapA:Play()
		
		
		
	end
	wait(1)
	hint.Text = randomgame.Name.." was chosen!"
	wait(1)
	
	clone = randomgame:Clone()
	clone.Parent = workspace
	hint.Text = "Teleporting players..."

	wait(1)
	for _, plr in pairs(game.Players:GetChildren()) do
		plr.Character.HumanoidRootPart.CFrame = CFrame.new(randomgame.Vector3.Value)
		plr.Character.HumanoidRootPart.Anchored = true
	end
	hint.Text = "3"
	wait(1)
	hint.Text = "2"
	wait(1)
	hint.Text = "1"
	wait(1)
	for _, plr in pairs(game.Players:GetChildren()) do
		plr.Character.HumanoidRootPart.Anchored = false
		
	end
	local its = 30
	while its > 0 do
		hint.Text = "("..its..")"
		wait(1)
		its = its - 1
	end
	game.ReplicatedStorage.LobbyMusic.MapA:Stop()
	clone:Destroy()
end
-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

The sounds dosen’t Play for the Player if they’re on ReplicatedStorage.
Also recommend you don’t use “Hints” since it’s been Deprecated.

1 Like

Sounds cannot be played in replicated storage. What you can do is clone it to workspace, play it, then destroy it

2 Likes

Sound can only be played when they are placed inside the workspace folder directly, a “BasePart” instance or an “Attachment” instance. If played from the workspace the sound will be heard by the entire server, if played from a part/attachment the sound will only be heard by players that are close to that part/attachment

Learn more, here:
https://developer.roblox.com/en-us/api-reference/class/Sound

1 Like

You should have the songs in sound service and then do the same but there. Sounds can’t play while parented to replicated storage.