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

So I am trying to make a speed run type of game, and having trouble with the music portion of it?

Asked by 4 years ago

I want a player to touch a part then it locally plays the music

script.Parent.Touched:Connect(function(plr)
    local sound = game.Lighting.PlayerMusic
sound.SoundId = "rbxassetid://301964312"
sound:Play()
end)

1 answer

Log in to vote
0
Answered by 4 years ago

In order for a sound to be heard, the Sound object needs to be in a part in the Workspace, not in Lighting.

Ad

Answer this question