How to set the model position to the center of the model?

So I got a script that makes a model and parents blocks to the model but for some reason the models position and pivot is in the top right corner of the model and I was wondering how would I make the models pivot go to the direct middle of the model

This is my script so far

function ChunkModule.HandleChunk(ChunkFolder)
	local ChunkModel = Instance.new("Model")
	ChunkModel.Name = "Chunk"
	ChunkModel.Parent = ChunkFolder

	for _, Part in pairs(ChunkFolder:GetChildren()) do
		if Part:IsA("BasePart") then
			Part.Parent = ChunkModel
		end
	end

	local ChunkGrid = 3 * 25
	local ChunkSize = Vector3.new(ChunkGrid, 50, ChunkGrid)

	local ModelHitbox = Instance.new("Part", ChunkModel)
	ModelHitbox.Size = ChunkSize
	ModelHitbox.Anchored = true
	ModelHitbox.CanCollide = false
	ModelHitbox.Transparency = 0.8
	ModelHitbox.Material = Enum.Material.SmoothPlastic
end

Theres a function belonging to Model that calculates its bounding box:

You can use this to record an offset, which you can then use to move the model from being placed on its pivot point to on its center.

How would i do it because i tried using it before but i couldn’t fix the offset