hi,
i have a multiplayer fps with cars. instatiate the player works fine but whenever your trying to get in the car, it cant parent. I tryed a lot of things, but nothing seems to work. it’s keep giving the error: “Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.
UnityEngine.Transform:set_parent(Transform)”. is there a way to do this?
here is the parent-part of my script(in csharp):
public Transform playertrans;
playertrans.parent = transform; // group the instance under the car
playertrans.localPosition = Vector3.zero; // make it at the exact position of the car
playertrans.localRotation = Quaternion.identity; // same for rotation