I know I should use a local script which I did but the sound can still be heard by other players here is the code
button1 = game.Workspace.button1
button2 = game.Workspace.button2
speaker = game.Workspace.speaker
player = game.Players.LocalPlayer
function pplay()
s = Instance.new("Sound",player)
s.SoundId = " http://www.roblox.com/asset/?id=375746963"
s.Volume = 1
s.Pitch = 1
s:Play()
end
function stopp()
if s.IsPlaying then
s:Stop()
end
end
button1.ClickDetector.MouseClick:connect(pplay)
button2.ClickDetector.MouseClick:connect(stopp)

1 comment
Thanks works :)