This is a followup to a question I had asked earlier: How do I make a sound play for a single player when they join? I got a comment saying that I had to do this: Okay, so to make it play for the player when they join, you will need to place the sound inside the StarterGui and then have a script play it when the join, except you will access it as PlayerGui. I havn't the faintest idea where to start with that, could someone post the script, or at least point me in the right direction?
✓ ANSWER ACCEPTED
How do I make a script that plays a sound in StarterGui, but accesses PlayerGui?
1 answer
✓ Accepted answer
Insert a sound into the StarterGui, then, have this script in the workspace:
game.Players.PlayerAdded:connect(function(player)
repeat wait() until player:findFirstChild("PlayerGui") -- Waits for PlayerGui to load
player.PlayerGui.Sound:Play()
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
