Cannot implicitly convert type 'UnityEngine.Collider2D' to 'UnityEngine.Collider2D[]'

i just created a script that looks like this:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{

    void Start()
    {
        Collider2D[] colliders = transform.GetComponentInChildren<Collider2D>(); //error here
    }

    // Update is called once per frame
    void Update()
    {
       
    }a
}

the error i got was exactly like this: Assets\PlayerController.cs(17,34): error CS0029: Cannot implicitly convert type ‘UnityEngine.Collider2D’ to ‘UnityEngine.Collider2D[ ]’

does anyone know how to fix this?

GetComponentInChildren returns the first component of that type on the gameobject
GetComponentsInChildren returns an array of all components of that type on the gameobject.

As above but also, get uingd to first looking at the scripting reference. For instance, this is what you’re calling and expected an array to be returned (which it doesn’t): https://docs.unity3d.com/ScriptReference/Component.GetComponentInChildren.html

Also, really look at the error well which says the same thing.