Yay, back to the same problem. This script, it will not fire when mouse0 is clicked.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AssaultRifle : MonoBehaviour {
public Rigidbody bullet;
public GameObject gun_end;
public float bullet_velocity = 10f;
void Update ()
{
}
void Shoot ()
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
Rigidbody clone = (Rigidbody)Instantiate(bullet, gun_end.transform.position, gun_end.transform.rotation);
clone.velocity = Vector3.forward * bullet_velocity;
}
}
}