Here's the script
local Value = 10
local Enabled = true
script.Parent.Touched:Connect(function(hit)
if Enabled then
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player then
local lstats = Player:WaitForChild("leaderstats")
lstats.Gold.Value = lstats.Gold.Value + Value
Enabled = false
script.Parent.Transparency = 1
if script.Parent:FindFirstChild("Sound") then
script.Parent:FindFirstChild("Sound"):Play()
end
end
end
end)
Right now, when a player collects the coin it disappears, but no other players can collect the coin. How would I make it so the coin only disappears on the player's screen (the player who touched the coin), but not on anyone else's?

3 comments
Sorry, I've just started programming. In the output I got "FireClient is not a valid member of LocalScript". Wasn't sure what to with the local script, am I suppose to place the local script in the coin object or in replicated storage?
you are ment to put in a remote event in replicatedstorage called destroycoin and put in a local script in backpack or startergui,also the bigger script should be a server script if it isnt already
thanks!