I use this code: Scene1
func _unhandled_input(event):
if Input.is_action_pressed("lpm"):
p = preload("res://KinematicBody2D.tscn").instance()
add_child(p)
p.position=get_global_mouse_position()
and i use button for clear but
func _on_remove_pressed():
p.clear()
And I would like to delete all children, but only the last one is removed