Best way to prevent objects from being placed in existing locations?

I am currently working on a free-placing tycoon game similar to Theme Park Tycoon 2 and Miner’s Haven. I’ve made a few scripts for placing objects, however, I want to prevent players from placing objects where something already is. What would the best way to do this? I could have a list of every possible location, but I don’t know what an efficient and neat way to do this would be. Any help is appreciated and thanks in advance!

Check if the location is available (not taken by something else) before placing something else on it.

Yes, I understand that is what I have to do, but I don’t understand how to do it well.

Perhaps you could try using the GetTouchingParts function.

Ok, I’ll look into this and see if it will work!