Created
April 2, 2020 19:19
-
-
Save Fraktality/ad6745fd5fdbb78633152d54c2ab3100 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function bbox(part) | |
local size = part.Size | |
local inv = part.CFrame:inverse() | |
local wx = size*inv.XVector | |
local wy = size*inv.YVector | |
local wz = size*inv.ZVector | |
return Vector3.new( | |
math.abs(wx.x) + math.abs(wx.y) + math.abs(wx.z), | |
math.abs(wy.x) + math.abs(wy.y) + math.abs(wy.z), | |
math.abs(wz.x) + math.abs(wz.y) + math.abs(wz.z) | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment