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

How to mute music for just on person?

Asked by 9 years ago

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)
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. alphawolvess 1784 — 9y

1 answer

Log in to vote
0
Answered by
Qxest 25
9 years ago

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.

Ad

Answer this question