I have this function that get an Object from the workspace and an integer value:
function GetLocalParts(Object, Range)
ObjectPosition = Object:GetPrimaryPartCFrame()
-- Region = ?
for i, v in pairs(game.Workspace:FindPartsInRegion3(Region, nil, 100))
print(Parts[i].Name)
end
end
What the function is supposed to do is create a Region3 with the radius as the Range value, but I have never worked with regions before and the wiki is not helping to understand.
Once it has created the Region, it will print all of the parts within it. How do I create the region?

1 comment
you forgot "do" on line 4