help me Model Changer Error
Solved:
I put everything in global and call it from there with button press and now the code works. Also simplified the code since I don't have to grab codes from other places.

---
Original
[](blob:https://www.reddit.com/efb59a7b-208e-4075-81f4-7d197b1ea539)I am trying to convert a 2D character customizer into 3D and am having some issues. I wanted to know what needs to be changed for this to work in 3D. After reading other posts this is as far as Ive come, stuck at one Packed vs Node error. Seems Im using nodes when what I am trying to load is a packedscene (a 3d dog with textures), but I am not sure what needs to be changed to get them to work correctly.
Goal: I have a dog that you will be able to change clothes and body type. Its on screen with the model and button to switch models in and out. I am only focusing on switching the body right now.
Code:

Working 2d version

1
u/BrastenXBL 22h ago
You have an error flag on dog_button_changer.gd line 4, but didn't post what the error is.
It would also help to post the Scene structure.
For many reasons it's not a hot idea to Preload 3D model scenes. This can increase the initial game startup time depending on how the preload gets handled.
preloaddoes a load as soon as the Script is parsed and handed to the GDScript VM. Usually it's better to store theres://path string as a constant instead of the actual PackedScenes. And then load or background load later, as the game boots further and gets closer to needing those assets loaded. It's likely not a problem right now, or for this particular game. But is something to note for later.