Hello, I am new to Unity and am trying to make a game with portals.
I have an object with tag "Player"
and am trying to change it’s transform properties to those of the portal but am getting the error GameObject
does not contain definition for transform
.
public class Portal : MonoBehaviour
{
void Update()
{
if (Input.GetMouseButtonDown(1))
{
GameObject player = GameObject.Find("Player");
player.transfrom.position = transfrom.position;
}
}
}