void OnTriggerEnter(Collider other)
{
if(other.gameObject.CompareTag(“Player”) && canrespawn)
{
other.gameObject.transform.position = new Vector3(0f, 0f, 0f);
}
}
Tried many variations, but can’t workaround the fact that transform is only Get (read-only). I could simply fix this by placing the code on the object i want to move, but i don’t want a lazy workaround just so that it bites me in the back later.
Cheers.