Assign Edge Collider Points to Trail Renderer Vertices

Hello,
I am trying to make the player collide with the trail renderer. I have a drawing system working where when the player clicks down on the mouse button, a trail is instantiated, and begins emitting and following the mouse pointer until the player lifts the mouse button up. Along with the trail, an edge collider is instantiated. What I’d like to do now, is to se the edge collider points to the trail renderers vertices every frame. The problem I’m getting with the code below is this error:
“error CS0029: Cannot implicitly convert type ‘UnityEngine.Vector3’ to ‘UnityEngine.Vector2’”
How would I get this working?
Thanks, and here’s the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PaintPlatformsPainter : MonoBehaviour
{

    public GameObject trailPrefab;
    public GameObject edgeColliderPrefab;

    private GameObject newTrailPaint;
    private GameObject newEdgeCollider;
    private Vector3[] colliderPoints = new Vector3[0];

    // Update is called once per frame
    void Update()

    {

        Vector2 mousePos = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
        Vector2 objectPos = Camera.main.ScreenToWorldPoint(mousePos);

        this.transform.position = objectPos;

        if (Input.GetButtonDown ("Fire1"))

        {

            newTrailPaint = Instantiate(trailPrefab, this.transform.position, Quaternion.identity);
            newTrailPaint.transform.SetParent(this.transform, true);
            newEdgeCollider = Instantiate(edgeColliderPrefab, this.transform.position, Quaternion.identity);
            newEdgeCollider.transform.SetParent(this.transform, true);
            newTrailPaint.GetComponent<TrailRenderer>().emitting = true;

        }

        if (Input.GetButtonUp("Fire1"))

        {

            newTrailPaint.GetComponent<TrailRenderer>().emitting = false;

        }

        if (Input.GetButton("Fire1"))

        {

            newTrailPaint.GetComponent<TrailRenderer>().GetPositions(colliderPoints);
            newEdgeCollider.GetComponent<EdgeCollider2D>().points = colliderPoints;

        }

    }

}

@CodesCove
I got this working with this script:

using System.Collections;
using System.Collections.Generic;
//using UnityEditor.Experimental.GraphView;
using UnityEngine;

public class PaintPlatformsPainter : MonoBehaviour
{

    public GameObject painter;

    public GameObject trailPrefab;
    public GameObject edgeColliderPrefab;

    private GameObject newTrailPaint;
    private GameObject newEdgeCollider;

    public float scrollValue;

    public int currentColor;

    public Color[] colors;

    public AudioSource switchSoundEffect;
    public AudioSource switchSoundEffect2;

    public AudioSource drawingSound;

    public bool joystickReset;

    // Update is called once per frame
    void Update()

    {

        if (Input.GetAxisRaw("Vertical") == 0)
        {
            joystickReset = true;
        }

        scrollValue = Input.GetAxisRaw("Mouse ScrollWheel");

        painter.GetComponent<SpriteRenderer>().color = colors[currentColor];
        trailPrefab.GetComponent<TrailRenderer>().startColor = colors[currentColor];
        trailPrefab.GetComponent<TrailRenderer>().endColor = colors[currentColor];

        if (Input.GetAxisRaw("Vertical") > 0 && joystickReset || scrollValue > 0)
        {
            joystickReset = false;
            if (!switchSoundEffect.isPlaying)
            {
                switchSoundEffect.Play();
            }
            if (currentColor == colors.Length - 1)

            {
                currentColor = 0;
            }
            else if (currentColor < colors.Length - 1)
            {
                currentColor++;
            }
        }
        else if (Input.GetAxisRaw("Vertical") < 0 && joystickReset || scrollValue < 0)
        {
            joystickReset = false;
            if (!switchSoundEffect2.isPlaying)
            {
                switchSoundEffect2.Play();
            }
            if (currentColor == 0)
            {
                currentColor = colors.Length - 1;
            }
            else if (currentColor > 0)
            {
                currentColor--;
            }
        }

        Vector2 mousePos = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
        Vector2 objectPos = Camera.main.ScreenToWorldPoint(mousePos);

        this.transform.position = objectPos;

        if (Input.GetButtonDown ("Fire1"))

        {

            newTrailPaint = Instantiate(trailPrefab, this.transform.position, Quaternion.identity);
            newTrailPaint.transform.SetParent(this.transform, true);
            newEdgeCollider = Instantiate(edgeColliderPrefab, this.transform.position, Quaternion.identity);
            newTrailPaint.GetComponent<TrailRenderer>().emitting = true;
            newEdgeCollider.transform.position = Vector3.zero;

        }

        if (Input.GetButton("Fire1"))

        {

            if (!drawingSound.isPlaying)
            {
                drawingSound.Play();
            }

            int maxSize = newTrailPaint.GetComponent<TrailRenderer>().positionCount;
            Vector2[] trailRendererPoints = new Vector2[maxSize];

            for (int i = 0; i < maxSize; i++)
            {
                trailRendererPoints *= newTrailPaint.GetComponent<TrailRenderer>().GetPosition(i);*

}

newEdgeCollider.GetComponent().points = trailRendererPoints;

}

if (Input.GetButtonUp(“Fire1”))

{
if (!drawingSound.isPlaying)
{
drawingSound.Stop();
}

newTrailPaint.GetComponent().emitting = false;

}

}

}

I got help from some Redditors in this link: Reddit - Dive into anything
Thank you!