How do i reparent a camera to the player when they spawns

Godot Version



my game has multiplayer and when you click host or join someone who is hosting it spawns you in but im stumped trying to find away to reparent the camera to the local player. does anyone know how i might do this?

Generally, you don’t need to reparent the camera object ever. What you do is change the target it is following. You can probably set that up so it happens when teh player object is added to the game world via the _ready() call. If the camera is always on the same position in the node tree relative to the viewport, it will be easy to find (you could also keep a reference to it as a static var). Then you script the camera to follow a target and switch the target when appropriate.