How to make a part spawn randomly in an area

Basically what is supposed to happen is randomly a coin should spawn and be placed randomly inside this giant blue area.

To keep things simple,

You have an area you want the coins to spawn in:

You have a coin:
image

And you have a script that spawns coins randomly through the area:

local coins = workspace.Coins
local area = coins.Area

while true do
	if workspace:GetAttribute("CoinsCanSpawn") == true and #coins:GetChildren() <= 101 then
		local randomArea = area
		local newCoin = game.ReplicatedStorage.Coin:Clone()
		Instance.new("Highlight", newCoin) --added for easier view
		newCoin.Parent = coins
		newCoin.Position = randomArea.Position + Vector3.new(math.random(-randomArea.Size.X/2, randomArea.Size.X/2), 1, math.random(-randomArea.Size.Z/2, randomArea.Size.Z/2))
	end
	
	task.wait(math.random(0.1, 2))
end

Problem is, they are only spawning in a straight line:


(I increased the amount of coins that can spawn just so you can see them more clearly)

How do I fix this?

probably try and give a offset for the random numbers as they may be too small to offset the coins scattered around

Only thing I can think of is maybe you took the wrong axis from the area which I assume is the blue part.

In this example, you are using a 1d plane, when you should be using a 2d plane, give the coins another angle to be placed on