Snail is totally right, please: if you have questions then tell us something about what's (not) happening so that we can help you better. Questions without the essential details will very often never get answered.
That said, I can see from your code the issue that you're probably having.
func _physics_process(delta):
if player == true:
var player
is missing an underscore here.
If you need your if
statement to be affected by the variable _player
then it should be:
func _physics_process(delta):
if _player == true:
Is that correct?