Spawn Part Within Radius Around Player, Only Within Certain Part Region

  1. I’m trying to spawn a part within an area around my player, bound within a certain part.
    Generally on the same elevation, I imagine to keep things safe when doing random spawns you’d want to fire a ray down to get the surface level properly in case there are elevation changes

  2. If I spawn a part randomly within the bounds of a part, and not also restricted to a radius around my player, the part could end up spawning too far away


    Inversely, if I only spawned around the player, I wouldnt want the part to end up behind me (in that screenshot) where it would end up outside the bounds of the Dark Green Part

In my head, the first things that come to mind are to keep doing random locations around the player, and then checking if thats within the region of the part. If not keep repeating until it is, but that doesnt seem very efficient or like the best way to do it?

I’ve tried looking up things about spawning within regions, but this extra step of keeping it bound to the radius of my player has felt a bit overly specific for any results