Make Barriers For My 2D Game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Badr

Hello guys,
I would like to make a barrier for my 2D game. The game is going vertically/upwards. I want to make the barriers be able to stop the player when he tries to pass them, as I do not want the player going to the end of the world. I am using GDscript. Any help would be appreciated.
Thanks in advance

:bust_in_silhouette: Reply From: Simon

Hi, you can use a sprite like a wall with a CollisionShape node or a tilemap with collision.