So basically I wanna spawn something randomly inside of a region3 but only on the Y axis to the floor; so how would I do that from where i am on this code
local plantsFolder = game.ServerStorage.plants:GetChildren()
local regionPart = game.Workspace:FindFirstChild("defaultMap").plantSpawns.plantSpawn1
local bottomLeft = regionPart.Position - (regionPart.Size / 2)
local topRight = regionPart.Position + (regionPart.Size / 2)
local region = Region3.new(bottomLeft,topRight)
local function spawnPlants(obj,pos)
local newPlant = obj:Clone()
newPlant.Parent = workspace
newPlant.PrimaryPart:SetNetworkOwner(nil)
newPlant.PrimaryPart.Position = -- not sure
print("Spawned "..newPlant.Name)
end
spawnPlants(plantsFolder[math.random(1,#plantsFolder)],--not sure)