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

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

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

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

1 comment

0

but the problem with that is the music will repeat when i respaw

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