@export var weapons : Array[NodePath]
@export var weaponsammo : Array[int]
get_node(weapons[currentWeapon]).totalAmmo = weaponsammo[currentWeapon]
print (weaponsammo[currentWeapon])
this doesnt work, it prints 0
edit//
strange it works now, probably cause it was in ready func?