Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help With A Music Script?

I made this music script but it won't work.

while true do
	game.Workspace.Music:Play()
	wait(100)
end

Well... It does sorta work, but every time the player dies the music restarts. How do I prevent that from happening?

3 comments

0

stick it in a localscript, and place it in startergui.

0

No that doesn't work.

0

fixed i t?

1 answer

✓ Accepted answer
local Players = game:GetService("Players")
Players.PlayerAdded:connect(function(player)
mus = game.Workspace.Music:clone()
mus.Parent = player.PlayerGui
mus.Looped = true
mus:Play()
end)

This script puts the music into the players' playergui. In here it should not be affected as the player dies.

3 comments

0

Thanks, I'm sure that that will help but it doesn't solve the issue I'm having. My problem is that the music restarts when the character dies.

0

Nope, the music still restarts on death

0

NVM I got it working

This discussion is preserved as it was. New answers, comments, and votes are closed.