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)

6 comments

0

Why is the GUI in Lighting?

0

I got the script from another question on here and it said to put it in Lighting :/

0

Don't copy scripts, and that script taught bad practices.

0

Ok..

0

in case you're wondering where you should put it, ReplicatedStorage is a good place to store that kind of thing

0

Ok