Hello, I am trying to make a multiplayer fps, but my damaging/kill system deosn’t work… The raycasts seem to not function because I get this error. NullReferenceException: Object reference not set to an instance of an object
shoot_handle.shoot (UnityEngine.Vector3 pos, UnityEngine.Vector3 rot, System.Int32 dmg) (at Assets/POLYGON - FPS free/scripts/shoot_handle.cs:156)
shoot_handle.Update () (at Assets/POLYGON - FPS free/scripts/shoot_handle.cs:59)
Here is the part of the script that isn’t working:
void Update()
{
foreach (add_shoot s in added_shoots)
{
shoot(s.pos, s.rot, s.dmg);
}
added_shoots.Clear();
}