Ad
Log in to vote
0

How to play a sound when a user joins?

Asked by 2 months 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? incapaz 6717 — 2mo
0
I got the script from another question on here and it said to put it in Lighting :/ Igotthemoney2212 -8 — 2mo
0
Don't copy scripts, and that script taught bad practices. incapaz 6717 — 2mo
0
Ok.. Igotthemoney2212 -8 — 2mo
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 gewehrreben 302 — 2mo
0
Ok Igotthemoney2212 -8 — 2mo

Answer this question