I'm trying to add music to my game so it starts for all players individually instead of one audio running running already when a player joins, (Ex: Server started 2 minutes ago, another player joins halfway through the audio playing.)
I've tried adding this at the end
if player.PlayerAdded then
sound1:Play()
but it doesn't seem to work help?
Script
local Players = game:GetService("Players")
function onPlayerAdded(player)
print(player.Name .. " has entered the game")
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _,player in pairs(Players:GetPlayers()) do
onPlayerAdded(player)
end

2 comments
I think this should work as long as I put the audio on looped.true Thanks!
How would I add a second audio to this?