My local script:
--local remote = game.ReplicatedStorage.RemoteEvents.Collect_Area
wait(0.3)
local hitbox = workspace.Collect_Coins_Area.HitBox_collect
local running = false
hitbox.Touched:Connect(function(hit)
--on touch
if not running then running = true
local plr = game.Players.LocalPlayer.Name
local sound = workspace.Collect_Coins_Area.sound
local remote = game.ReplicatedStorage.RemoteEvents.Collect_Area
local pi = game.Players[plr]:FindFirstChild("leaderstats").Pieces
if pi.Value >=0 then
sound:Play()
remote:FireServer()
wait(5)
running = false
end

6 comments
you're missing an "end"
"if not running then running = true end"
I think the problem is that you have to have an end after every if or for loop. Correct me if I'm wrong.
and at the last "end" you need to add ")" because that's a connection
you're missing 2 ends
Thank you all!