How to "set" variables in a PackedScene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dap404

For a normal scene I can do this and my challenge_number is set :

@onready var scene = preload("res://scenes/test.tscn")
var challenge_modal = scene .instantiate()
challenge_modal.set("challenge_number", 3)

I will be using change_scene_to_packed
A bit lost on how to set variables here to access in the scene change and how to use the change to packed method

:bust_in_silhouette: Reply From: BillRogers

Hey, hope I’m understanding your question right, but you should be able to set any variable in your instanced scene using the dot accessor, or whatever it’s called. Ex: "challenge_modal.your_variable = your_value".
Or if you made setter functions in the packed scene, then

Did that help?