I’ve been stuck trying to figure out how to play a sound when a player joins the game. I’ve looked all over the devforum and couldn’t find anything useful. I’ve made my own code, but it’s not playing at all.
Is this in a local script?
What is the script parented in?
Sounds need to be in the workspace or inside a Part if I remember correctly.
Why not just manually put this Sound in the Workspace and get the script to play it instead of adding it and playing it locally?
local Part = --local the part
game.Players.PlayerAdded:Connect(function()
local sound = Instance.new("Sound", Part)
sound.SoundId = "rbxassetid://10787981997"
sound:Play
end)