How to limit the sound only for the player that active or purchase things?

I still could not figure out how to make the sound locally for the players by playing the sound under ServerScriptService. I have searched it on how to do it on YT and Google. Seems that im not smart enough to understand or the solution was entirely different…

This is how the script looked like

local insertcoin = Instance.new("Sound", game.Workspace)
	insertcoin.SoundId = "Sound ID here"
	local coin1 = player.leaderstats.Coins.Value 
	if coin1 >= 1 then
		insertcoin:Play()

And it played for everyone in the game… help please

Play it in a local script. That’s probably the easiest way, so one way is by using a remote event and then letting a server script tell a local script to play a sound.

Another way (which is I think is frowned upon and is bad scripting) is cloning a local script to the player and that local script then plays a sound.

1 Like