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

Why is it not muting the regular song for just my player and not others when I press the block?

Asked by 6 years ago
local function ontouch(part)
    local hum = part.Parent:FindFirstChild("HumanoidRootPart")
    if hum then
    game.Workspace.Vipmusic:Play()
    game.Workspace.Musicscript.Disabled = true
    end
end

script.Parent.Touched:connect(ontouch)

For some reason it's not even playing the music I want and I want it to only change the songs for the person who stepped on block. Please help

1 answer

Log in to vote
0
Answered by
Aethys 0 Donator
6 years ago

When a sound is in Workspace, it is global.

If you want the sound to play locally, you can put it into the PlayerGui.

You would have to change the paths in the script to this after moving it:

game.Players.Player.PlayerGui.Music
0
but the problem with that is the music will repeat when i respaw duckyo011 36 — 6y
Ad

Answer this question