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

How to mute music for just on person?

If you click on mute it wont work it just mute server music not for one player but for all players I hope you can help me

Music Script

game.Players.PlayerAdded:connect(function (newPlayer)
	while true do 

	wait(0) 

	script.Sound:Play() 
	
	wait(5200) 

	script.Sound:Stop()

	wait (1)

	end	
end)

Mute script

game.Players.PlayerAdded:connect(function (newPlayer)
stopped = false
sound = game.Workspace.MusicScript.Sound
script.Parent.Text = "Mute Music"
script.Parent.MouseButton1Down:connect(function()
    if stopped == true then
        sound:Play()
        stopped = false
        script.Parent.Text = "Mute Music"
    else
        sound:Pause()
       	 stopped = true
        script.Parent.Text = "Unmute Music"
    end
end)

1 comment

0

Please search for similar questions in this site, their have been multiples of this one! Also, just create the Sound inside of their PlayerGui and turn it off inside of PlayerGui.

1 answer

✓ Accepted answer

Use a local script. Local scripts only affect only one person (which is the person who wants to mute the music) rather than the whole server unlike regular scripts.

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