I wanted to spawn items at random places around a map, however this map can have different elevations. I do not want to place blocks and spawn them in a part's place, I was wondering if there is a method I could look into that would help me achieve that?
So basically spawning something at random locations around the map, however make sure that it is directly on top of the surface of the ground.
I am not asking for code, I'm just asking for methods (with a brief explanation) to look into, and I will do my research.
Help is much appreciated.
If you're using Terrain and simply want to ignore all models (trees, buildings, etc), simply use https://developer.roblox.com/en-us/api-reference/function/Workspace/FindPartOnRayWithWhitelist and give it a whitelist of just {workspace.Terrain}
If you aren't using Terrain but just a bunch of parts, if you have all your parts in a single folder, you can pass that folder into the function instead and that will work too.
There is also an ignore list: https://developer.roblox.com/en-us/api-reference/function/Workspace/FindPartOnRayWithIgnoreList