Help with multiplayer in 4.5

Godot Version

Godot 4.5

Question

The game is complete, it is able to connect to other computers, have many players in a lobby but for some reason their cards never instance properly. Everything works in engine but as soon as other computers join the cards’ process function doesn’t even work.

Below is the how the player’s hand takes the array of ints given by the dealer (host), turns them into the correct card resource, sorts them and tells the cards what card to be. The second function is how the cards take that resource and render everything.

At some point in this process I don’t know what happens but the cards don’t even continue processing. And this is the only issue between the devices, the computers are able to communicate everything else for some reason just not his, please help.


@rpc("authority")
func distribute_hand(new_hand):
	
	for child in cards.get_children():
		child.free()
	
	hand = []
	for obj in new_hand:
		hand.append(NetworkHandler.Allcards.get(obj))
		create_card()
	
	var all_cards = cards.get_children()
	
	if playable: # sort hand by suit and value
		var Hhand = []
		var Dhand = []
		var Shand = []
		var Chand = []
		
		for obj in hand:
			if obj.suit == 1:
				Hhand.append(obj)
			elif obj.suit == 2:
				Dhand.append(obj)
			elif obj.suit == 3:
				Shand.append(obj)
			elif obj.suit == 4:
				Chand.append(obj)
		
		var allhands = [Hhand,Dhand,Shand,Chand]
		hand = []
		for eachhand in allhands:
			eachhand.sort_custom(func(a,b): return a.value > b.value)
			hand.append_array(eachhand)
	
	var curent_card = 0
	for child in all_cards:
		child.make_card(hand.get(curent_card))
		curent_card+=1
	card_spots.sort(hand.size())
	if myid != 0:
		if first_round:
			first_round = false
		else:
			Update_Score()
		Update_Bid()

func make_card(new_card):
	Card = new_card
	var card_index = Card.value + ((Card.suit - 1) * 13) - 1
	sprite_2d.texture = CardSkins.ALLEN_DECK.get(card_index)
	
	var card_title = str(Card.value)
	card_title += " of "
	card_title += str(Card.suit)
	label.text = card_title