My code worked perfectly and something happened, now, I don't know why, the player node returns null and all stop working.
var motion = Vector2()
var player = get_parent().get_node("player")
position += (player.position - position)/50
motion = move_and_collide(motion)