In multiplayer: how can I have unique transform scalings for each player that show for every play but only affect the individual?
Hi, This is my first multiplayer project but I haven't had much trouble until now, however I've spent almost 20 hours scouring the internet looking for solutions and havn't been able to find one. even though I'm certain the solution must be a simple one!
My project is a multiplayer, battle royale, where before joining the game players are able to customize their player's appearance by changing the color and the dimensions of their player.
The issue is that I can't get the changes to both only affect the player they're supposed to and to still be visible to all other players.
The way that I have it set up is very simple: once in the game, the player has a script on it that pulls its desired dimensions from my database in the form of a Vector3 and then all that needs to happen is the proper application to that players transform.
Things that I've tried:
public class PlayerCustoms : networkbehaviour {
[syncvar] public Transform playerModel;
void Start(){ playerModel.transform .localScale = customVector3; }
}
public class PlayerCustoms : networkbehaviour {
public Transform playerModel; Player[] players;
void Start(){ CmdCustomize(); }
[command] CmdCustomize(){ RpcCustomize(); }
[ClientRpc] RpcCustomize(){ foreach (Player player in players){ player.getcomponent().playerModel.transform .localScale = customVector3; } }
}
and then just about everything else I can think of... Please help!