Laser you can dash through not registering player is dashing

Godot Version

v4.3.stable.official [77dcf97d8]

Question

im trying to make a laser that the player can go through if they are dashing but for some reason the laser’s script doesnt notice the isDashing variable at all. Not getting errors either

Laser_Killzone_Dash.gd

func _on_body_entered(body: Node2D):
	if not player.isDashing:
		print("You died!")
		body.get_node("AmberSprite").play("Laser")
		$"../Laser cut".play()
		timer.start()

Player.gd

if Input.is_action_just_pressed("Dash") and canDash:
		isDashing = true

I need more information, is it running the code as if the player isn’t dashing?

Have you placed print statements after isdashing = true in player and in your body entered to make sure that the player isn’t entering before the dashing is true for some reason.

Also, you have the var player, you already have body in the func, why don’t you just use that and say if not body.is_dashing:

What debugging have you done? More indepth information of what you’ve tested can help. Learning how to debug code will help you immensely moving forward.