extends VBoxContainer var TrayItemScene = preload("res://TrayItem.tscn") # Called when the node enters the scene tree for the first time. func _ready(): for i in range(5): add_item() func add_item(): var tray_item = TrayItemScene.instantiate() %Items.add_child(tray_item)