hello i been trying to make a thing when u collect a coin you can only hear the sound please 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)

3 comments
localscript
what do you mean "you can only hear it" plz elaborate
play the sound in the player gui