Allow server to send RPC to everybody

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

Is it possible to allow RPC from the server on clients even if they are network master locally?
I’m trying to call this function on the client:

remote func set_pos(new_pos : Vector2):
	position = new_pos
	rset('slave_position', new_pos)

from server:

func _on_player_connected(id):
	print('Player with id ' + str(id) + ' connected')
	rpc_id(id, 'set_pos', $'/root/Node2D/Spawns/Spawn1'.position)

(this function is connected to network_peer_connected)
but I’m getting this error on client:

RPC 'set_pos' is not allowed from: 1. Mode is 0, master is 1.

If this is not possible, what is the best way to allow the server to control clients?

Did you ever figure this out?

tproper | 2019-10-12 20:30