Problem with kill zone

Godot Version

4.6.2

Question

Hey,

First of all, I’m new to game development, this is my first time using any game engine, and I’m sorry if this is some type of ‘basic’ bug, but I couldn’t find anything.
I’m having a problem - my kill zone doesn’t work. The problem started when the kill zone didn’t register that the player fell into it. I solved it with just coordinates, everything alright. Then I jumped with the player, it killed him constantly and thanks to the console logs, I found out that the kill zone somehow killed him even though it’s more down. Then I jumped on a different place and found out that only first three blocks are the problem and I can’t find the problem.
I will be really grateful if someone would be able to help me.

This is code for the kill zone:

extends Area2D

@onready var timer: Timer = $Timer

func _ready() -> void:
	timer.timeout.connect(_on_timer_timeout)

func _on_body_entered(body: Node2D) -> void:
	if timer.is_stopped():
		print("You died!")
		timer.start()

func _on_timer_timeout() -> void:
	print("Timer finished! Reloading...")
	get_tree().reload_current_scene()

And this is code for the player:

extends CharacterBody2D


const SPEED = 100.0
const JUMP_VELOCITY = -300.0


func _physics_process(delta: float) -> void:
	# Add the gravity.
	if not is_on_floor():
		velocity += get_gravity() * delta

	# Handle jump.
	if Input.is_action_just_pressed("ui_accept") and is_on_floor():
		velocity.y = JUMP_VELOCITY

	# Get the input direction and handle the movement/deceleration.
	# As good practice, you should replace UI actions with custom gameplay actions.
	var direction := Input.get_axis("ui_left", "ui_right")
	if direction:
		velocity.x = direction * SPEED
	else:
		velocity.x = move_toward(velocity.x, 0, SPEED)

	move_and_slide()
	
	if global_position.y > 1000:
		print("Player fell out of bounds!")
		get_tree().reload_current_scene()

What’s with the timer?

What prints? You have two different scenarios that will reload the scene.

In the player script:

And from an Area:

can i have the project file to see the problem(i dont steal i cook)

and can you please define the problem so my potato brain understand?

Ye, sorry for not specifying. I mean print in the kill zone.

Simplified: for some reason my player gets killed by the kill zone on the first 3 blocks of game when he jumps even tho the kill zone is not here (and only these three blocks)

uno reversed?

i mean normal blocks kill while kill zone no is kill zone’nt

Is your area scaled in any way? Do you have any errors or warnings?

Nope, it’s not, and I don’t have any error nor warnings, that’s what I find kinda confusing.

How does your Area2D collusion looks like?

It looks like this:

Where’s the collusion shape of the Area2D?
is this one?

Yes, it’s this one

why it looks like this? looks like a gradient

It’s world border

I got it, but what are you using as the border?
A healthy border should look like this

I’m using CollisionShape2D and as shape I’m using a WorldBoundaryShape2D

hmmm,lol never saw that collusion shape
but why is your area not detecting the player?

try this: