How to make a portal centering system

I am using the Ego Moose portal system and I use a free model portal gun with a few modified scripts. The problem is I can shoot a portal at the lowest part of the wall and it will go through the floor. Is there any way to fix this?

1 Like

You can check if the portal is touching parts that you can’t place portals or other portalable parts, if it detects move the portal to the oposite position.