Player does not appear in the Main scene (even after calling show())

Godot Version

Godot-4

Question

Hi, I’m having an issue where my Player does not appear when I run the Main scene in Godot 4.

The Player scene works fine when I run it alone, but when I instance it inside the Main scene, it becomes invisible.

Here is what I know:

  • The Player is an Area2D.

  • In _ready() I call hide(), and later I call show() inside start(pos).

  • I confirmed that start() is being called.

  • I confirmed that the Player’s position is inside the screen.

  • I tried calling show() on both the Player node and its AnimatedSprite2D.

  • I can print the Player’s position every frame, so the logic is running, but the Player is still not visible.

  • No error is printed in the console.

Please show your code as preformatted text with triple backticks ``` at the beginning and end.
And show a screenshot of your scene tree setup.

2 Likes

Normally, I would agree with @wchc (and you should post your code here), but I also recommend you go do this tutorial. It’ll take about an hour and give you a good foundation.

I make this recommendation based on the fact that you are clearly new to these forums, and from this statement (emphasis mine):

These two things say to me that you are likely new to Godot. I make this recommendation because for the player you should be using a CharacterBody2D. There are many reasons for this, and the above tutorial will give you a grounding in many things Godot and then you will have working code from which to refer.

2 Likes

Sorry, that’s my bad. I’ll keep these points in mind when asking questions next time. Also, I’ve already fixed the issue. Thank you!

I was actually following this tutorial, and it does use Area2D for the player. I’ve already fixed the issue, and I’ll provide more detailed information when I ask questions next time. Thank you for your advice!

1 Like

Maybe you can provide some information how you fixed the problem, so that others encountering the same issue can try your solution?

1 Like

Wow. You are correct. My bad.