After the last update, my guns won't instantiate projectiles anymore

I drag my projectile into the inspector, everything with it is good to go. All my gun scripts were working before the last update and now nothing I do, will spawn a projectile. This doesn’t even use speed.

Gunscript:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabWeapon : MonoBehaviour {
public Transform firePoint;
public GameObject bulletPrefab;
// Update is called once per frame
void Update () {
if (Input.GetButtonDown(“Fire1”))
{
Shoot();
}
}
void Shoot ()
{
Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
}
}

Bullet Script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour {
public float speed = -20f;
public Rigidbody2D rb;
public int damage = 30;
void Start()
{
rb.velocity = transform.right * speed;
}
void OnTriggerEnter2D (Collider2D hitInfo)
{
Enemy enemy = hitInfo.GetComponent();
if (enemy != null)
{
enemy.TakeDamage(damage);
}

Destroy(gameObject);
}
}

Error: CS0111 Type ‘WeaponTest2’ already defines a member called ‘Shoot’ with the same parameter types

Please use code tags and also, the error points you to a class called WeaponTest2

1 Like

Thanks! Deleted the other script!