Hello so i been trying to make when you collect a coin you can only hear it (locally) and not the entire server so please somebody send some help
local db = true script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then if db == true then db = false script.Parent.Transparency = 1 local player = game.Players:GetPlayerFromCharacter(hit.Parent) player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 5 script.Sound:Play() script.Parent.Transparency = 1 wait (13) db= true script.Parent.Transparency = 0 end end end)
do a remote event to a local script and in the local script play the sound only you should be able to hear it in a local script if you dont know how to use a remote event go here: https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events