How can I get collision from a tile map?

Tried using the Tile Map object to create a wall, but the player just phases through it.

This is the code I used:


probably not the best code I could have used TBH.

Also, before anyone suggests it, the tiles have their hitboxes activated.

Never mind, I literally just fixed the issue

Code I used:
image

Not even 1 minute passed for me to fix it