I want to spawn parts in a certain area (An island model), however, the area is not a rectangular area, and so I cannot just do 2 math.random statements. Would there be a way (such as an equation) to have it spawn in more of a circular fashion, or would I simply have to split the area into multiple smaller rectangles?
Are you asking how to find a random point inside a circle, or inside a polygon (and is it convex or concave)?
The absolute easiest way is to generate a point in a random position within the shape’s bounding box. If that point is not on the island, reject that point and try again. Repeat until you get one.
Otherwise you could google “random point within polygon” and go from there, but I don’t think it’s worth the trouble to implement, as neat as it might be.