hi, i made a script that makes it so when a player touches the brick, it plays a new sound and ends the old one, the only problem is is that it plays the sound for everyone in the server.
here is the script i was using before:
script.Parent.Touched:connect(function(hit) game.Workspace.Sound:Play() end)
here is the script i thought might work:
script.Parent.Touched:connect(function(hit) game.Players[hit.Parent.Name].game.Workspace.Sound:Play() end)
thanks in advance, from poopypigeon245
You can use local sounds. You just have to move the sound into the players player gui.
script.Parent.Touched:connect(function(hit) local plr = hit.Parent.Name if game.Players:FindFirstChild(plr) then workspace.Sound:Clone().Parent = game.Players[plr].PlayerGui if game.Players[plr].PlayerGui.Sound.IsPlaying == false then game.Players[plr].PlayerGui.Sound:Play() end end end)