using UnityEngine;
using System.Collections;
var bullitPrefab : Transform;
public class NewBehaviourScript2 : MonoBehaviour
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
if(Input.GetButtonDown("Fire1"))
{
var bullit =Instantiate(bullitPrefab, transform.position, transform.rotation);
bullit.rigidbody.AddForce(transform.forward * 4000);
}
}
This the the error code i get
Assets/Scripts/NewBehaviourScript2.cs(3,19): error CS8025: Parsing error
If someone could tell me how to fix this it would be much appreciated as i am a noob with programming ![]()