I'll simplify this, 2 nodes. Product and Main

Main node

var product = preload ("res://Products/Product.gd")
var productlist = []

func _ready():
	create_products()
	
func create_products():
	var product1 = product.new(null)
	productlist.append(product1)

Product Node

func _init(price): 
		price = 10

So what I want to do is print out the price of the product. So it would just print "10". I can't seem to do this. I tried.

print(product1.price)

But apparently that doesn't work.

You can send just about any variables to print() and it should work. However, you have to make sure that product1 is in scope at the time. Probably you want to print from the array index.

print(productList[0])

Or to go through the whole array:

for product in productList:
    print(product)
2 years later