So the way i have the script set up its suppose to spawn at the target transform but instead its spawning way off in the distance.
void isattacker()
{
if (isattackingnow == true)
{
if (Input.GetMouseButtonDown(0) && GetComponent<Battler>().attacktimer.fillAmount == 1)
{
hitsound.Play();
Instantiate(hit, target);
target.GetComponent<Battler>().takedamage(attackDamage);
target.GetComponent<EnemyControl>().takedamage(attackDamage);
}
}
}