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