I need to make it so that when you hold down “Fire1” the player shoots continuously until you release. Is there a way to do that? Here’s the script I’m using to shoot:
var Laser : GameObject;
function Update ()
{
if(Input.GetButtonDown("Fire1"))
{
Instantiate(Laser, transform.position, transform.rotation);
}
}
The script works but all I need is to make shoot continuously when holding a button down. Please help.