I’m confused about most aspects of RotatedRegion3:FindPartsInRegion3 and I’d like a scripted example of how it works. I’ve spent around 3 hours trying to look up resources to figure this out, but I can’t. The output outputs “Unable to cast value to Object” every attempt I try.
Heres my script:
local hi = RotatedRegion3.new(Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-3), Vector3.new(5,7,5))
local partsinregion3 = RotatedRegion3:FindPartsInRegion3(hi, nil, 20)
for i, v in pairs (partsinregion3) do
print(v.Name)
end
If you could correct this, or give an example I’d greatly appreciate it!