Why does rpc() only works in _physics_process and not in _ready?

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

I’m trying to call rpc() to change the name of the same player in a different client.

I’m new to this so sorry If my question doesn’t make sence…
So basically I have this network system that works quite well to call rpc() , but the rpc() call only works in func _physics_process(_delta): (for things like movement) and it cannot be called in func _ready(): , why? And is there any other way to call it once when the game starts?

:bust_in_silhouette: Reply From: lewis glasgow

RPC works anywhere as it’s in a function, when a node call rpc it will try to find a node with the same name and path. Make shore that before you rpc the actual name of the node is the same

I see, thank you so much!

GeorgeLovesJesus | 2022-07-02 10:04