I tried using this script to make the player larger and smaller when pressing U or J wich kinda works.
Im new to networking and unity for that matter…
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class SinglepalyerSizeChanger : NetworkBehaviour
{
public GameObject player;
public GameObject model;
public float growvalue = 0.2f;
public float growvalue2 = 0.01f;
void Update()
{
if (isLocalPlayer)
{
Enlarge();
Dislarge();
return;
}
}
void Enlarge()
{
if (Input.GetKeyDown(KeyCode.U))
{
player.transform.localScale += new Vector3(growvalue, growvalue, growvalue);
}
}
void Dislarge()
{
if (Input.GetKeyDown(KeyCode.J))
{
player.transform.localScale += new Vector3(-growvalue, -growvalue, -growvalue);
}
}
}
But when using it on network the second player (or first if the second is growing/shrinking) sees the first guy floating in the air. The model doesnt grow.
Anyone have any idea about how i could do that?