Is there a way to check if you are not colliding with something in a script

FYI: Rather than plain text, here’s how to post code on the forums: Using code tags properly