Advertisement
TRBLX_Dev

RegionPartService-Documentation

Aug 15th, 2022
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.59 KB | None | 0 0
  1. -- Official Documentation of "RegionPartService" by T3_MasterGamer
  2.  
  3. RegionPartService:IsPartInRegion(region: BasePart|Region3, partOrModel: BasePart|Model, regionParams: Region3Params|OverlapParams?): boolean
  4. -- the function "IsPartInRegion" consists of three parameters: region, partOrModel, and regionParams. this functon returns a boolean whether the "partOrModel" is inside the "region" using the "regionParams".
  5. -- the "region" parameter must either be a BasePart or a Region3, else it will error.
  6. -- the "partOrModel" paramater, as its name says, must either be a BasePart or a Model.
  7. -- the "regionParams" parameter is optional, meaning you can leave it blank (nil) or setting its value. this must either be OverlapParams (for BaseParts), Region3Params (for Region3), or nil (by default).
  8.  
  9. Region3Params = {
  10.     filterType = ("Blacklist" or "Whitelist" or nil),
  11.     descendantsTable = {Instance},
  12.     maxParts = number or #descendantsTable or nil
  13. }
  14. -- Region3Params is a table that consists of "filterType", "descendantsTable", and "maxParts".
  15. -- "filterType" is optional, either "Blacklist", "Whitelist", or nil (nil by default).
  16. -- "descendantsTable" is a table that consists of Instances (more specifically BaseParts/Models) that will either be ignored (Blacklist/nil) or will only be included in the operation (Whitelist).
  17. -- "maxParts" is also optional, either a number or nil (nil is #descendantsTable by default). this is the number of parts (in descendantsTable) will only be included in the operation.
  18.  
  19. RegionPartService:isPartInRegion()
  20. -- is the same as RegionPartService:IsPartInRegion()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement