Found a bug when you die if you have a homing arrow and it shoots and you die before you get hit the next time you respawn it will go to your location and hit you doing damage.
[I fixed it using]
private void Update()
{
if (target)
{
if (isHoming && !target.IsDead())
{
transform.LookAt(GetAimLocation());
}
if (target.IsDead())
{
target = null;
Destroy(gameObject);
}
}
transform.Translate(Vector3.forward * (speed * Time.deltaTime));
}
alos thank you for the code