Here's the code.
export var value = 1
var coin_get : bool
get_node("Area2D").connect("body_entered", self, "_collect_coin")
if str(body) == "Player:[KinematicBody2D:1294]":
get_owner().coins_collected += value
All of the code under the collectcoin function runs except for the coin sound. I've looked online and am pretty sure that that's how you would play sound. If you need anything else I'm happy to give it. Thanks.