You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
What I am going for is a script handles the math and auto-matically fills each box with products. By the size of the product (X & Z) and by the size of the box on both (X & Z) axis’ it comepletly fills the box up with product/merchandise. -
What is the issue? Include screenshots / videos if possible!
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve been able to size the box to the amount of products I’d like inside by changing the Size.X and Size.Z to the Size.X/Z of the Monster Energy Can by multiplying number x
---what I mean,
local main = workspace.TestBox
local maincan = main.Energ
main.Size = Vector3.new(maincan.Size.X*3,main.Size.Y,maincan.Size.Z * 3)
--- This works, but for when I want to clone the main can and properly position it no matter the CFrame, this is where I run into issues.
--[[
This technically works as written; however,
I'd like it to position itself based upon the interior-bottom surface area of the box.
--]]
local main = workspace.TestBox
local maincan = main.Energ
local newcan = maincan:Clone()
newcan.Parent = main
newcan.CFrame = maincan.CFrame + Vector3.new(0,0,maincan.Size.Z)
Please let me know if you have any good solutions or math I can utilize as it would be of great help!