I am trying to say if the Y of my player reaches below 0 change the players position to 0,1,0 it wont work thought and I tried using Vector3 but it says I cant use Vector3 like a method Please help!

Here is my code If your wondering I’m making a 3D game about a player dodging blocks.

using UnityEngine;
public class RSet : MonoBehaviour

  {
 public GameObject player = null;

    // Start is called before the first frame update
void Start()
 {
    
 }

// Update is called once per frame
void Update()
 {
   if(player.transform.player.y < 0) {
   player.transform.position = Vector3(0,1,0);
     }
  }
}

,This is my code…

using UnityEngine;

public class RSet : MonoBehaviour

{

public GameObject player = null;

    // Start is called before the first frame update
void Start()
{
    
}

// Update is called once per frame
void Update()
{
   if(player.transform.player.y < 0) {
   player.transform.position = Vector3(0,1,0);
   }
}

}

Make the following change, and see if it works as you are expecting…

change

player.transform.position = Vector3(0,1,0);

to

player.transform.position = new Vector3(0,1,0);

Hope this helps,
-Larry