Not instantiating custom resource in runtime

Godot Version

4.4

Question

Hi there,

First time poster so I hope I can describe my problem clearly!

I’ve been having trouble with implementing debuffs into my game, it used to work but for some reason it starting giving me errors.

My implementation is as follows:

Aura & Burn Custom Resources:

#Aura.gd
extends Resource
class_name Aura

@export var name : String
@export var duration : float
@export var stat : Stats
@export var damage : float
var time_elapsed : float

signal tick

...
func apply(target):
	print("affected on: " + str(target))
...
#Burn.gd
extends Aura
class_name Burn

func _init(time):
	super._init(time)
	time = duration

func apply(target):
	super.apply(target)

func remove(target):
	super.remove(target)

func on_tick(target):
	target.take_damage(damage)

Weapon & Fireball Custom Resources:

#Weapon.gd
extends Item
class_name Weapon
...
@export var auras : Array[Aura]
...
			
func collided(projectile, target):
	...
	
	target.apply_aura(auras[0]) #THIS LITERALLY USED TO WORK BUT DUNNO WHY IT STOPPED
#Fireball.gd
extends Weapon
class_name Fireball

var aura = preload("res://Entities/Auras/Burn.tres").duplicate()

...

func shoot(source, target, scene_tree):

...
	projectile = projectile_node.instantiate() #instantiate projectile node
	scene_tree.current_scene.add_child(projectile) #add it to scene tree
	projectile.collided.connect(collided)


Projectile, an Area2D Node instantiated by the Custom Resources above:

#Projectile.gd
extends Area2D
...
signal collided
...

func _on_body_entered(body) -> void:
...
	
		collided.emit(self, body)
...

#Enemy.gd
extends CharacterBody2D

...
var enemy_auras : Array[Aura] = []
...
func apply_aura(name):
	enemy_auras.append(name) #first add the aura that's being applied to an array of all auras for this enemy
	name.apply(self) #call the apply function of the aura itself to apply its effects, passing the enemy instance

...

In the Fireball.tres, I specify the Burn.tres as a member of the auras Array via the inspector.

During runtime, I get the error that the function:
target.apply_aura(auras[0])
is out of bounds, and upon runtime, the inspector of the “self” member reveals that the auras array is indeed empty, but all the other variables, such as damage etc are all set. So my suspicion is that the resource in the array didn’t instantiate itself.

What’s funny is that this used to work fine until a few days ago, runtime inspection even showed that the aura was correctly staying in the Enemy’s enemy_aura array. But I guess I touched something or checked a checkbox that I shouldn’t have?

Any help would be appreciated, thank you in advance!

Best regards,

Will

Adding a screenshot of the runtime for additional context: