So here is where I am messing around with the code:
Code: Select all
if (localPlayer != null) {
pos = localPlayer.transform.position;
rot = localPlayer.transform.rotation;
Camera.main.transform.parent = null;
Destroy(localPlayer);
} else {
pos = sp[0];
Debug.Log(sp[0]);
rot = Quaternion.identity;
}
While my reserch I found this question, I need full clarity on this, help me with good explanation.