UPDATE:
i solved it, i was making an instance of it so it couldn't reach the tree...
yeah rookie mistake
tree:
-Node2D
--Player (kinematicbody)
--Node2D
i'm trying to call get_tree() but it returns null (from the player script)
i searched online and everybody says the node must be in scenetree but it is in it.
what do I do?