using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ArrowScript : MonoBehaviour
{
void OnCollisionEnter2D(Collision2D collision)
{
//GameObject effect = Instantiate(hiteffect, transform.position, Quaternion.identity);
//Destroy(effect, 5f)
Destroy(gameObject);
}
}
What is wrong with this I have no idea could it be a problem with visual studios
OnTriggerEnter2D worked but I had a bug where it said I was still using it it was because the arrow was inside my player that it was summoning from so the prefab was getting instantly destroyed. Thanks for all the help
ye forgot to do that :)