Expression denotes a type where a variable, value or method group was expected.

So I am working on moving the current game object (this.transform.position). to another game boject called SpawnPoint1.

This is how I thought It would be done:
this.transform.position = Vector3(SpawnPoint1.transform.position.x, SpawnPoint1.transform.position.y, SpawnPoint1.transform.position.z);

C#.
But it says the error seen in the title. Any Clues what the problem might be?

You missed out the new keyword

transform.position = new Vector3(SpawnPoint1.transform.position.x, SpawnPoint1.transform.position.y, SpawnPoint1.transform.position.z);

1 Like

Thanks alot man!

1 Like