Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to play a sound when a user joins?

Asked by 5 years ago

Hi! I am trying to make a simple UI appear on player join, when it shows, I want a sound to play, I don't know how complicated it would be to make it so only the player that has the GUI hears the sound so I think I need to play the sound in a different Local Script when the player joins I believe. If you could help me that'd be amazing. As for my UI code to make it show on player join, incase you need it, here it is:

    local gui = game.Lighting.BALoader -- the name of your gui
game.Players.PlayerAdded:connect(function(player)
    player:WaitForChild("PlayerGui")
    gui:Clone().Parent = player.PlayerGui
end)
0
Why is the GUI in Lighting? User#19524 175 — 5y
0
I got the script from another question on here and it said to put it in Lighting :/ Igotthemoney2212 -3 — 5y
0
Don't copy scripts, and that script taught bad practices. User#19524 175 — 5y
0
Ok.. Igotthemoney2212 -3 — 5y
View all comments (2 more)
0
in case you're wondering where you should put it, ReplicatedStorage is a good place to store that kind of thing User#22604 1 — 5y
0
Ok Igotthemoney2212 -3 — 5y

Answer this question