On line 8,26 error CS1519 shows up…
here’s the script for reference:
using UnityEngine;
using System.Collections;
public class DestroyOnContact : MonoBehaviour {
public int count;
public GameObject;
public bool CompareTag (string tag);
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Collision.gameObject.tag == other.gameObject.tag)
{
count+=1;
Collision.transform.parent = transform;
}
if(transform.childCount >= 2 && count>= 3)
{
Destroy(gameObject);
Destroy(other.Gameobject);
count = 1;
}
}
}
I don’t understand how to fix it, due to the fact that I’m a beginner.
Can someone show me how to fix this please?