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

Music Player Enter problems?

Asked by
thePyxi 179
9 years ago

I know something is wrong with this. I can't seem to figure it out. I want to have a Sound Instance for the player when he/she has entered, but it is not happening. Can someone help me with this?

In advanced, thanks!

function onPlayerEntered(newPlayer)
    local s = Instance.new("Sound")
    s:Clone().newPlayer
    s.Name = "Music"
print("1")  
    s.Volume = 1
    s.Looped = true
print("2")  
    s.SoundId = "rbxassetid://142896835"
    s.Pause = false
    s.Play = true
    print("3")
end

game.Players.ChildAdded:connect(onPlayerEntered)

Answer this question