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

Play music from StarterGUI not working?

Asked by
RoyMer 301 Moderation Voter
10 years ago

Trying to play music from the StarterGUI, why isn't this script working?

game.Players.PlayerAdded:connect(function(player)
wait(5)-- Change to wait for player longer.
player:WaitForDataReady()
while wait(1) do
player.PlayerGui.Music.Pitch = 1
player.PlayerGui.Music:Play()
end
end)
0
Is it a local script? EzraNehemiah_TF2 3552 — 10y
0
It can be whatever you want it to be as long as it works RoyMer 301 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Try this instead:

player=script.Parent
player:WaitForDataReady()
while wait(120) do -- Change 120 to the number of second the sound is.
player.PlayerGui.Music.Pitch = 1
player.PlayerGui.Music:Play()
end
0
Not working :/ RoyMer 301 — 10y
Ad

Answer this question