as you can see, the object placement isn’t quite right. i need it to properly place the object ontop of the hexagon tile. this is the function that gets the cframe
function Static:GetPlacementCF(model: Model, tilePos: Vector3, tileSize: Vector3, rotation: number)
return CFrame.new(tilePos.X, tilePos.Y + tileSize.Y, tilePos.Z) * CFrame.Angles(0, rotation, 0)
end
You’ll have to reduce the amount you add based on the size by dividing it by 2. Currently, you’re adding the entire height of the tile from the middle, which will always be taller than it. Try this instead:
function Static:GetPlacementCF(model: Model, tilePos: Vector3, tileSize: Vector3, rotation: number)
return CFrame.new(tilePos.X, tilePos.Y + tileSize.Y/2, tilePos.Z) * CFrame.Angles(0, rotation, 0)
end