I am looking to achieve a music system that plays a certain song once I join the game. So people know that I have joined. Everyone inside the game will be able to hear the song as well including myself. I am not sure how to write this code, if someone can send a tutorial or leave the code in the comments that would be much appreciated.
in a Script inside serverscriptservice connect to the Players.PlayerAdded event, check if the player of the event has your UserId and if it does play a sound
Here is script,you need to put sound you want to play into script and give it name Sound then you can change sound id you want:
local sound = script.Sound
game:GetService("Players").PlayerAdded:Connect(function(player)
if player.UserId == 125472773 then --it is your user id, also if UserId don't work try PlayerId,also this numbers is your UserId i just checked it
sound:Play()
end
end)
Also i just it was in drafts but i writed it 3 days ago when you just posted