The error is (15,45): error CS1002: ; expected
And here is my code, i don"t understand what the issue is
Can you guys help me?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TrainMove : MonoBehaviour
{
int TrainSpeed = 5;
Vector3 Home = new Vector3(44.8f,3.5f,-33.5f);
public Transform TrainTransform;
// Start is called before the first frame update
void Start()
{
TrainTransform.Position() = Vector3 Home;
}
// Update is called once per frame
void Update()
{
}
}
This line is incorrect. Are you getting this code from a tutorial? You will want to check this line, you probably want to remove “Vector3”
TrainTransform.Position() = Vector3 Home;