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

can anyone fix this music script please?

Asked by 10 years ago
function sound()
wait(20)
   script.MUSIC:Play(1)
Players.PlayerAdded:connect(sound)
end

its not working at all :(

4 answers

Log in to vote
1
Answered by
Nickoakz 231 Moderation Voter
10 years ago
function sound()
wait(20)
   script.MUSIC:Play(1)
Players.PlayerAdded:connect(sound)
end

You have the PlayerAdded caller in a function. Try this..

function sound()
    wait(10)
    script.MUSIC:Play(1)
end
Players.PlayerAdded:connect(sound)

Also make sure that there is the MUSIC inside the script.

Ad
Log in to vote
1
Answered by
c0des 207 Moderation Voter
10 years ago
function sound()
    wait(5)
    script.MUSIC:Play(1)
end
Players.PlayerAdded:connect(sound)

You have to call the function when a player enters.

0
hi its still not doing anything... Shaydesilva 85 — 10y
Log in to vote
1
Answered by 10 years ago
function sound()
    wait(5)
    script.MUSIC:Play(1)
end
Players.PlayerAdded:connect(sound)
Log in to vote
-2
Answered by 10 years ago

Or you can say this-

Script.Parent.MUSIC:Play()

Answer this question