I'm a beginner when it comes to scripting, and I noticed when I use this script in my game, every time someone enters, it repeats, and it replays the beginning each time. I want it so only the person who has entered the game hears this music from the beginning, and not everyone who has already spawned. Can someone give me some tips or advice on how to do this? I think it may have something to do with LocalPlayer, not sure though..Thanks!
Script:
game.Players.PlayerAdded:connect(function() wait(23.5) song = script.Parent script.Parent:Play() script.Parent.Looped = true end)
To make music play for only one person, clone a sound to their PlayerGui:
game.Players.PlayerAdded:connect(function(player) -- Player parameter wait(23.5) song = script.Parent:clone() --Clone the sound song.Parent = player.PlayerGui -- Parent it to the PlayerGui song:Play() song.Looped = true end)
Make the song play in their PlayerGui when they enter