GameTab Hi! Please consider adding more info.
Looking at your code, I can see that no variable coins
is defined - try this:
extends KinematicBody2D
var coins = 0
func win():
if coins == 2:
Player.global_position = Vector2(0, 0)
I am not sure if this is the problem, but it should fix code errors you have!