# Table of Contents - [Aimwork | Aimwork](#aimwork-aimwork) - [Aimwork | Aimwork](#aimwork-aimwork) - [Getting Started with Aimwork | Aimwork](#getting-started-with-aimwork-aimwork) - [Changelog | Aimwork](#changelog-aimwork) - [PlayerTracker | Aimwork](#playertracker-aimwork) - [PlayerObject | Aimwork](#playerobject-aimwork) - [Checks | Aimwork](#checks-aimwork) - [FOVObject | Aimwork](#fovobject-aimwork) - [Functions | Aimwork](#functions-aimwork) --- # Aimwork | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/api/Aimwork/#__docusaurus_skipToContent_fallback) On this page Types[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#types "Direct link to Types") ----------------------------------------------------------------------------------------- ### `AimworkSelected`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#AimworkSelected "Direct link to AimworkSelected") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/types/selected.luau#L9) `interface` `AimworkSelected {` `Player:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player)` \-- The current selected [Player](https://developer.roblox.com/en-us/api-reference/class/Player) . Note that if this is equal to [Players.LocalPlayer](https://developer.roblox.com/en-us/api-reference/class/Players#LocalPlayer) , then there is not a selected player. `Part:` `[BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart)` \-- The closest part to the cursor inside of the [Player.Character](https://developer.roblox.com/en-us/api-reference/class/Player#Character) . `Position:` `[Vector3](https://developer.roblox.com/en-us/api-reference/datatype/Vector3)` \-- The [Part.Position](https://developer.roblox.com/en-us/api-reference/class/Part#Position) of the closest part. `Distance:` `number`\-- The on screen distance from the cursor to the on screen [Part.Position](https://developer.roblox.com/en-us/api-reference/class/Part#Position) of the closest part. `}` Properties[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#properties "Direct link to Properties") -------------------------------------------------------------------------------------------------------- ### `FOV`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#FOV "Direct link to FOV") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L39) `Aimwork.FOV:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ` The FOV to use. ### `Checks`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#Checks "Direct link to Checks") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L44) `Aimwork.Checks:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ` The Checks to use. ### `Settings`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#Settings "Direct link to Settings") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L49) `Aimwork.Settings:` `[Configuration](https://developer.roblox.com/en-us/api-reference/class/Configuration) ` The configuration to use. ### `Selected`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#Selected "Direct link to Selected") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L54) `Aimwork.Selected:` `[AimworkSelected](https://stefanuk12.github.io/aimwork/api/Aimwork#AimworkSelected) ` The current Selected player. Functions[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#functions "Direct link to Functions") ----------------------------------------------------------------------------------------------------- ### `new`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#new "Direct link to new") constructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L64) `Aimwork.``new``(``Settings:` `[Configuration](https://developer.roblox.com/en-us/api-reference/class/Configuration)` `) →` `[Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) ` Constructs a new [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) . ### `Initialise`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#Initialise "Direct link to Initialise") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L82) `Aimwork.``Initialise``(``self:` `[Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) ``) →` `(``)` Finishes the initialisation process for [Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) , called during [Aimwork.new](https://stefanuk12.github.io/aimwork/api/Aimwork#new) . ### `Destroy`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#Destroy "Direct link to Destroy") destructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L95) `Aimwork.``Destroy``(``self:` `[Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) ``) →` `(``)` Cleans up, then destroys this object. > Note that you cannot use this object anymore, it's set to `nil`. ### `LoadPatch`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#LoadPatch "Direct link to LoadPatch") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L104) `Aimwork.``LoadPatch``(` `self:` `[Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) ``,` `PatchName:` `string` `) →` `(``)` Attempts to load a custom patch. ### `IteratePlayer`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#IteratePlayer "Direct link to IteratePlayer") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L115) `Aimwork.``IteratePlayer``(` `self:` `[Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ` `) →` `(``)` Processes a [Player](https://developer.roblox.com/en-us/api-reference/class/Player) to check if they can be processed, i.e. don't process dead players. ### `Iterate`[​](https://stefanuk12.github.io/aimwork/api/Aimwork/#Iterate "Direct link to Iterate") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/init.luau#L135) `Aimwork.``Iterate``(``self:` `[Aimwork](https://stefanuk12.github.io/aimwork/api/Aimwork) ``) →` `(``)` Processes all [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) s inside of the [PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) . Show raw api { "functions": \[\ {\ "name": "new",\ "desc": "Constructs a new \[PlayerObject\].\\n\\n ",\ "params": \[\ {\ "name": "Settings",\ "desc": "",\ "lua\_type": "Configuration"\ }\ \],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "Aimwork\\n"\ }\ \],\ "function\_type": "static",\ "tags": \[\ "constructor"\ \],\ "source": {\ "line": 64,\ "path": "src/init.luau"\ }\ },\ {\ "name": "Initialise",\ "desc": "Finishes the initialisation process for \[Aimwork\], called during \[Aimwork.new\].\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Aimwork"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 82,\ "path": "src/init.luau"\ }\ },\ {\ "name": "Destroy",\ "desc": "Cleans up, then destroys this object.\\n> Note that you cannot use this object anymore, it's set to \`nil\`.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Aimwork"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "tags": \[\ "destructor"\ \],\ "source": {\ "line": 95,\ "path": "src/init.luau"\ }\ },\ {\ "name": "LoadPatch",\ "desc": "Attempts to load a custom patch.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Aimwork"\ },\ {\ "name": "PatchName",\ "desc": "",\ "lua\_type": "string"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 104,\ "path": "src/init.luau"\ }\ },\ {\ "name": "IteratePlayer",\ "desc": "Processes a \[Player\] to check if they can be processed, i.e. don't process dead players.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Aimwork"\ },\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 115,\ "path": "src/init.luau"\ }\ },\ {\ "name": "Iterate",\ "desc": "Processes all \[PlayerObject\]s inside of the \[PlayerTracker\].\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Aimwork"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 135,\ "path": "src/init.luau"\ }\ }\ \], "properties": \[\ {\ "name": "FOV",\ "desc": "The FOV to use.",\ "lua\_type": "FOVObject",\ "source": {\ "line": 39,\ "path": "src/init.luau"\ }\ },\ {\ "name": "Checks",\ "desc": "The Checks to use.",\ "lua\_type": "Checks",\ "source": {\ "line": 44,\ "path": "src/init.luau"\ }\ },\ {\ "name": "Settings",\ "desc": "The configuration to use.",\ "lua\_type": "Configuration",\ "source": {\ "line": 49,\ "path": "src/init.luau"\ }\ },\ {\ "name": "Selected",\ "desc": "The current Selected player.",\ "lua\_type": "AimworkSelected",\ "source": {\ "line": 54,\ "path": "src/init.luau"\ }\ }\ \], "types": \[\ {\ "name": "AimworkSelected",\ "desc": "",\ "fields": \[\ {\ "name": "Player",\ "lua\_type": "Player",\ "desc": "The current selected \[Player\]. Note that if this is equal to \[Players.LocalPlayer\], then there is not a selected player."\ },\ {\ "name": "Part",\ "lua\_type": "BasePart",\ "desc": "The closest part to the cursor inside of the \[Player.Character\]."\ },\ {\ "name": "Position",\ "lua\_type": "Vector3",\ "desc": "The \[Part.Position\] of the closest part."\ },\ {\ "name": "Distance",\ "lua\_type": "number",\ "desc": "The on screen distance from the cursor to the on screen \[Part.Position\] of the closest part."\ }\ \],\ "source": {\ "line": 9,\ "path": "src/types/selected.luau"\ }\ }\ \], "name": "Aimwork", "desc": "The main class that handles everything.", "source": { "line": 34, "path": "src/init.luau" } } * [Types](https://stefanuk12.github.io/aimwork/api/Aimwork/#types) * [AimworkSelected](https://stefanuk12.github.io/aimwork/api/Aimwork/#AimworkSelected) * [Properties](https://stefanuk12.github.io/aimwork/api/Aimwork/#properties) * [Checks](https://stefanuk12.github.io/aimwork/api/Aimwork/#Checks) * [FOV](https://stefanuk12.github.io/aimwork/api/Aimwork/#FOV) * [Selected](https://stefanuk12.github.io/aimwork/api/Aimwork/#Selected) * [Settings](https://stefanuk12.github.io/aimwork/api/Aimwork/#Settings) * [Functions](https://stefanuk12.github.io/aimwork/api/Aimwork/#functions) * [Constructor](https://stefanuk12.github.io/aimwork/api/Aimwork/#constructor) * [.new](https://stefanuk12.github.io/aimwork/api/Aimwork/#new) * [Destructor](https://stefanuk12.github.io/aimwork/api/Aimwork/#destructor) * [.Destroy](https://stefanuk12.github.io/aimwork/api/Aimwork/#Destroy) * [.Initialise](https://stefanuk12.github.io/aimwork/api/Aimwork/#Initialise) * [.Iterate](https://stefanuk12.github.io/aimwork/api/Aimwork/#Iterate) * [.IteratePlayer](https://stefanuk12.github.io/aimwork/api/Aimwork/#IteratePlayer) * [.LoadPatch](https://stefanuk12.github.io/aimwork/api/Aimwork/#LoadPatch) --- # Aimwork | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/#__docusaurus_skipToContent_fallback) ### Insane Optimisations Aimwork has been written from the ground up to be as optimised as possible ### Reputable The developers behind Aimwork are well known in the community, often given the title of the first person to make a Da Hood silent aim in 2020 ### Free and Open Source The code behind Aimwork is one of the most high quality Roblox scripts out there. Not only that, but it's free and open source Why you should use Aimwork -------------------------- There's no point reinventing the wheel, so there's no point making your own `GetClosestPlayerToCursor` function when Aimwork exists. Aimwork handles everything for you, in an optimised way. It's likely to be far more performant than anything you can make yourself. The goal of Aimwork is to handle hundreds of players with mininal (as low as 0) FPS impact. This isn't the benefits though. There are many more: * Insane Optimisations > Aimwork has been written from the ground up to be as optimised as possible * Reputable > The developers behind Aimwork are well known in the community, often given the title of the first person to make a [Da Hood](https://www.roblox.com/games/2788229376/Da-Hood) > [silent aim](https://v3rmillion.rip/showthread.php?tid=979929) > in 2020 * Free and Open Source > The code behind Aimwork is one of the most high quality Roblox scripts out there. Not only that, but it's free and open source --- # Getting Started with Aimwork | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/docs/intro/#__docusaurus_skipToContent_fallback) Here are some quick links to get started using Aimwork: * [**API Docs**](https://stefanuk12.github.io/aimwork/api) --- # Changelog | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/changelog/#__docusaurus_skipToContent_fallback) \[0.1.0\] - TBD (dd/mm/yyyy)[​](https://stefanuk12.github.io/aimwork/changelog/#010---tbd-ddmmyyyy "Direct link to [0.1.0] - TBD (dd/mm/yyyy)") ------------------------------------------------------------------------------------------------------------------------------------------------ 🚀 Initial release!! * [\[0.1.0\] - TBD (dd/mm/yyyy)](https://stefanuk12.github.io/aimwork/changelog/#010---tbd-ddmmyyyy) --- # PlayerTracker | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#__docusaurus_skipToContent_fallback) On this page Properties[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#properties "Direct link to Properties") -------------------------------------------------------------------------------------------------------------- ### `Players`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#Players "Direct link to Players") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L20) `PlayerTracker.Players:` `{``[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``}` All the associated [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) s that are being tracked. Functions[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#functions "Direct link to Functions") ----------------------------------------------------------------------------------------------------------- ### `new`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#new "Direct link to new") constructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L33) `PlayerTracker.``new``(``) →` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ` Constructs a new [PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) . ### `Initialise`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#Initialise "Direct link to Initialise") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L51) `PlayerTracker.``Initialise``(``self:` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ``) →` `(``)` Finishes the initialisation process for [PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) , called during [PlayerTracker.new](https://stefanuk12.github.io/aimwork/api/PlayerTracker#new) . ### `Destroy`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#Destroy "Direct link to Destroy") destructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L87) `PlayerTracker.``Destroy``(``self:` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ``) →` `(``)` Cleans up, then destroys this object. > Note that you cannot use this object anymore, it's set to `nil`. ### `GetFromInstance`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#GetFromInstance "Direct link to GetFromInstance") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L97) `PlayerTracker.``GetFromInstance``(` `self:` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ``,` `Player:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player) ` `) →` `(` `number?``,` `[PlayerObject?](https://stefanuk12.github.io/aimwork/api/PlayerObject) ` `)`\-- The index and value of the [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) inside of [PlayerTracker.Players](https://stefanuk12.github.io/aimwork/api/PlayerTracker#Players) , if it exists. Get a [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) from the stored [PlayerTracker.Players](https://stefanuk12.github.io/aimwork/api/PlayerTracker#Players) . ### `OnPlayerAdded`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#OnPlayerAdded "Direct link to OnPlayerAdded") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L110) `PlayerTracker.``OnPlayerAdded``(` `self:` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ``,` `Player:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player) ` `) →` `(``)` Ran when a new [Player](https://developer.roblox.com/en-us/api-reference/class/Player) joins the game. It starts tracking them and adds them to [PlayerTracker.Players](https://stefanuk12.github.io/aimwork/api/PlayerTracker#Players) . ### `OnPlayerRemoved`[​](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#OnPlayerRemoved "Direct link to OnPlayerRemoved") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_tracker.luau#L122) `PlayerTracker.``OnPlayerRemoved``(` `self:` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ``,` `Player:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player) ` `) →` `(``)` Ran when a [Player](https://developer.roblox.com/en-us/api-reference/class/Player) leaves the game, cleaning up their [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) and removing them from [PlayerTracker.Players](https://stefanuk12.github.io/aimwork/api/PlayerTracker#Players) . Show raw api { "functions": \[\ {\ "name": "new",\ "desc": "Constructs a new \[PlayerTracker\].\\n\\n ",\ "params": \[\],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "PlayerTracker\\n"\ }\ \],\ "function\_type": "static",\ "tags": \[\ "constructor"\ \],\ "source": {\ "line": 33,\ "path": "src/modules/player\_tracker.luau"\ }\ },\ {\ "name": "Initialise",\ "desc": "Finishes the initialisation process for \[PlayerTracker\], called during \[PlayerTracker.new\].\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerTracker"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 51,\ "path": "src/modules/player\_tracker.luau"\ }\ },\ {\ "name": "Destroy",\ "desc": "Cleans up, then destroys this object.\\n> Note that you cannot use this object anymore, it's set to \`nil\`.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerTracker"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "tags": \[\ "destructor"\ \],\ "source": {\ "line": 87,\ "path": "src/modules/player\_tracker.luau"\ }\ },\ {\ "name": "GetFromInstance",\ "desc": "Get a \[PlayerObject\] from the stored \[PlayerTracker.Players\].\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerTracker"\ },\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "Player"\ }\ \],\ "returns": \[\ {\ "desc": "The index and value of the \[PlayerObject\] inside of \[PlayerTracker.Players\], if it exists.",\ "lua\_type": "(number?, PlayerObject?)"\ }\ \],\ "function\_type": "static",\ "source": {\ "line": 97,\ "path": "src/modules/player\_tracker.luau"\ }\ },\ {\ "name": "OnPlayerAdded",\ "desc": "Ran when a new \[Player\] joins the game. It starts tracking them and adds them to \[PlayerTracker.Players\].\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerTracker"\ },\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "Player"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 110,\ "path": "src/modules/player\_tracker.luau"\ }\ },\ {\ "name": "OnPlayerRemoved",\ "desc": "Ran when a \[Player\] leaves the game, cleaning up their \[PlayerObject\] and removing them from \[PlayerTracker.Players\].\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerTracker"\ },\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "Player"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 122,\ "path": "src/modules/player\_tracker.luau"\ }\ }\ \], "properties": \[\ {\ "name": "Players",\ "desc": "All the associated \[PlayerObject\]s that are being tracked.",\ "lua\_type": "{ PlayerObject }",\ "source": {\ "line": 20,\ "path": "src/modules/player\_tracker.luau"\ }\ }\ \], "types": \[\], "name": "PlayerTracker", "desc": "Tracks all \[Player\]s in the game via \[PlayerObject\].", "source": { "line": 15, "path": "src/modules/player\_tracker.luau" } } * [Properties](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#properties) * [Players](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#Players) * [Functions](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#functions) * [Constructor](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#constructor) * [.new](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#new) * [Destructor](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#destructor) * [.Destroy](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#Destroy) * [.GetFromInstance](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#GetFromInstance) * [.Initialise](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#Initialise) * [.OnPlayerAdded](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#OnPlayerAdded) * [.OnPlayerRemoved](https://stefanuk12.github.io/aimwork/api/PlayerTracker/#OnPlayerRemoved) --- # PlayerObject | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/api/PlayerObject/#__docusaurus_skipToContent_fallback) On this page Properties[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#properties "Direct link to Properties") ------------------------------------------------------------------------------------------------------------- ### `Instance`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Instance "Direct link to Instance") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L21) `PlayerObject.Instance:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player) ` The associated [Player](https://developer.roblox.com/en-us/api-reference/class/Player) . ### `Character`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Character "Direct link to Character") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L26) `PlayerObject.Character:` `[Model?](https://developer.roblox.com/en-us/api-reference/class/Model) ` The associated [Player](https://developer.roblox.com/en-us/api-reference/class/Player) 's Character, if they have one. ### `BodyParts`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#BodyParts "Direct link to BodyParts") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L31) `PlayerObject.BodyParts:` `{``[BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart)` `}` All of the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) 's body parts. ### `Health`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Health "Direct link to Health") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L36) `PlayerObject.Health:` `number` The health of the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) . ### `Friend`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Friend "Direct link to Friend") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L41) `PlayerObject.Friend:` `boolean` Whether the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) is a friend of [Player.LocalPlayer](https://developer.roblox.com/en-us/api-reference/class/Player#LocalPlayer) or not. ### `ForceField`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#ForceField "Direct link to ForceField") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L46) `PlayerObject.ForceField:` `boolean` Whether the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) has a [ForceField](https://developer.roblox.com/en-us/api-reference/class/ForceField) or not. Functions[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#functions "Direct link to Functions") ---------------------------------------------------------------------------------------------------------- ### `new`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#new "Direct link to new") constructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L65) `PlayerObject.``new``(``Player:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player)` `) →` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ` Constructs a new [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) . ### `Initialise`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Initialise "Direct link to Initialise") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L88) `PlayerObject.``Initialise``(``self:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``) →` `(``)` Finishes the initialisation process for [PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) , called during [PlayerObject.new](https://stefanuk12.github.io/aimwork/api/PlayerObject#new) . ### `Destroy`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Destroy "Direct link to Destroy") destructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L107) `PlayerObject.``Destroy``(``self:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``) →` `(``)` Cleans up, then destroys this object. > Note that you cannot use this object anymore, it's set to `nil`. ### `OnChildAdded`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnChildAdded "Direct link to OnChildAdded") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L115) `PlayerObject.``OnChildAdded``(` `self:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``,` `Child:` `[Instance](https://developer.roblox.com/en-us/api-reference/datatype/Instance) ` `) →` `(``)` Called whenever a child is added inside of the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) s character, setting tracked values and connections. ### `OnChildRemoved`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnChildRemoved "Direct link to OnChildRemoved") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L131) `PlayerObject.``OnChildRemoved``(` `self:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``,` `Child:` `[Instance](https://developer.roblox.com/en-us/api-reference/datatype/Instance) ` `) →` `(``)` Called whenever a child is removed from the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) s character, cleaning up associated tracked values back to their default "falsy" values. ### `OnCharacterAdded`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnCharacterAdded "Direct link to OnCharacterAdded") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L147) `PlayerObject.``OnCharacterAdded``(` `self:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``,` `Character:` `[Model?](https://developer.roblox.com/en-us/api-reference/class/Model) ` `) →` `(``)` Called whenever the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) s character spawns, initialising all connections, etc. ### `OnCharacterRemoved`[​](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnCharacterRemoved "Direct link to OnCharacterRemoved") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/player_object.luau#L169) `PlayerObject.``OnCharacterRemoved``(` `self:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``,` `_Character:` `[Model](https://developer.roblox.com/en-us/api-reference/class/Model) ` `) →` `(``)` Called whenever the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) s character is destroyed. It resets all tracked values to their default "falsy" values. Show raw api { "functions": \[\ {\ "name": "new",\ "desc": "Constructs a new \[PlayerObject\].\\n\\n ",\ "params": \[\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "Player"\ }\ \],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "PlayerObject\\n"\ }\ \],\ "function\_type": "static",\ "tags": \[\ "constructor"\ \],\ "source": {\ "line": 65,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "Initialise",\ "desc": "Finishes the initialisation process for \[PlayerObject\], called during \[PlayerObject.new\].\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 88,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "Destroy",\ "desc": "Cleans up, then destroys this object.\\n> Note that you cannot use this object anymore, it's set to \`nil\`.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "tags": \[\ "destructor"\ \],\ "source": {\ "line": 107,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "OnChildAdded",\ "desc": "Called whenever a child is added inside of the \[Player\]s character, setting tracked values and connections.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerObject"\ },\ {\ "name": "Child",\ "desc": "",\ "lua\_type": "Instance"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 115,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "OnChildRemoved",\ "desc": "Called whenever a child is removed from the \[Player\]s character, cleaning up associated tracked values back to their default \\"falsy\\" values.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerObject"\ },\ {\ "name": "Child",\ "desc": "",\ "lua\_type": "Instance"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 131,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "OnCharacterAdded",\ "desc": "Called whenever the \[Player\]s character spawns, initialising all connections, etc.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerObject"\ },\ {\ "name": "Character",\ "desc": "",\ "lua\_type": "Model?"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 147,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "OnCharacterRemoved",\ "desc": "Called whenever the \[Player\]s character is destroyed. It resets all tracked values to their default \\"falsy\\" values.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "PlayerObject"\ },\ {\ "name": "\_Character",\ "desc": "",\ "lua\_type": "Model"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 169,\ "path": "src/modules/player\_object.luau"\ }\ }\ \], "properties": \[\ {\ "name": "Instance",\ "desc": "The associated \[Player\].",\ "lua\_type": "Player",\ "source": {\ "line": 21,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "Character",\ "desc": "The associated \[Player\]'s Character, if they have one.",\ "lua\_type": "Model?",\ "source": {\ "line": 26,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "BodyParts",\ "desc": "All of the \[Player\]'s body parts.",\ "lua\_type": "{ BasePart }",\ "source": {\ "line": 31,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "Health",\ "desc": "The health of the \[Player\].",\ "lua\_type": "number",\ "source": {\ "line": 36,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "Friend",\ "desc": "Whether the \[Player\] is a friend of \[Player.LocalPlayer\] or not.",\ "lua\_type": "boolean",\ "source": {\ "line": 41,\ "path": "src/modules/player\_object.luau"\ }\ },\ {\ "name": "ForceField",\ "desc": "Whether the \[Player\] has a \[ForceField\] or not.",\ "lua\_type": "boolean",\ "source": {\ "line": 46,\ "path": "src/modules/player\_object.luau"\ }\ }\ \], "types": \[\], "name": "PlayerObject", "desc": "Tracks a specific \[Player\] and all of the relevant information associated with them.", "source": { "line": 16, "path": "src/modules/player\_object.luau" } } * [Properties](https://stefanuk12.github.io/aimwork/api/PlayerObject/#properties) * [BodyParts](https://stefanuk12.github.io/aimwork/api/PlayerObject/#BodyParts) * [Character](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Character) * [ForceField](https://stefanuk12.github.io/aimwork/api/PlayerObject/#ForceField) * [Friend](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Friend) * [Health](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Health) * [Instance](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Instance) * [Functions](https://stefanuk12.github.io/aimwork/api/PlayerObject/#functions) * [Constructor](https://stefanuk12.github.io/aimwork/api/PlayerObject/#constructor) * [.new](https://stefanuk12.github.io/aimwork/api/PlayerObject/#new) * [Destructor](https://stefanuk12.github.io/aimwork/api/PlayerObject/#destructor) * [.Destroy](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Destroy) * [.Initialise](https://stefanuk12.github.io/aimwork/api/PlayerObject/#Initialise) * [.OnCharacterAdded](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnCharacterAdded) * [.OnCharacterRemoved](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnCharacterRemoved) * [.OnChildAdded](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnChildAdded) * [.OnChildRemoved](https://stefanuk12.github.io/aimwork/api/PlayerObject/#OnChildRemoved) --- # Checks | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/api/Checks/#__docusaurus_skipToContent_fallback) On this page Properties[​](https://stefanuk12.github.io/aimwork/api/Checks/#properties "Direct link to Properties") ------------------------------------------------------------------------------------------------------- ### `PlayerTracker`[​](https://stefanuk12.github.io/aimwork/api/Checks/#PlayerTracker "Direct link to PlayerTracker") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L29) `Checks.PlayerTracker:` `[PlayerTracker](https://stefanuk12.github.io/aimwork/api/PlayerTracker) ` Used internally to track the status of all [Player](https://developer.roblox.com/en-us/api-reference/class/Player) s ### `FOV`[​](https://stefanuk12.github.io/aimwork/api/Checks/#FOV "Direct link to FOV") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L34) `Checks.FOV:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ` Holds all FOV-related data, including methods that help with checking if a [Vector2](https://developer.roblox.com/en-us/api-reference/datatype/Vector2) point in inside of the FOV. ### `Configuration`[​](https://stefanuk12.github.io/aimwork/api/Checks/#Configuration "Direct link to Configuration") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L39) `Checks.Configuration:` `[Configuration](https://developer.roblox.com/en-us/api-reference/class/Configuration) ` Contains the entire configuration, however, only certain parts are used. Functions[​](https://stefanuk12.github.io/aimwork/api/Checks/#functions "Direct link to Functions") ---------------------------------------------------------------------------------------------------- ### `new`[​](https://stefanuk12.github.io/aimwork/api/Checks/#new "Direct link to new") constructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L55) `Checks.``new``(` `FOV:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ``,` `Config:` `[Configuration](https://developer.roblox.com/en-us/api-reference/class/Configuration) ` `) →` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ` Constructs a new [Checks](https://stefanuk12.github.io/aimwork/api/Checks) object. ### `Destroy`[​](https://stefanuk12.github.io/aimwork/api/Checks/#Destroy "Direct link to Destroy") destructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L74) `Checks.``Destroy``(``self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``) →` `(``)` Cleans up, then destroys this object. > Note that you cannot use this object anymore, it's set to `nil`. ### `ForceField`[​](https://stefanuk12.github.io/aimwork/api/Checks/#ForceField "Direct link to ForceField") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L83) `Checks.``ForceField``(` `_self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) has a [ForceField](https://developer.roblox.com/en-us/api-reference/class/ForceField) . ### `Friend`[​](https://stefanuk12.github.io/aimwork/api/Checks/#Friend "Direct link to Friend") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L91) `Checks.``Friend``(` `_self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the [Player](https://developer.roblox.com/en-us/api-reference/class/Player) is a friend to the [Player.LocalPlayer](https://developer.roblox.com/en-us/api-reference/class/Player#LocalPlayer) . ### `Health`[​](https://stefanuk12.github.io/aimwork/api/Checks/#Health "Direct link to Health") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L99) `Checks.``Health``(` `_self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the `Player` has a health **above** 0. ### `Invisible`[​](https://stefanuk12.github.io/aimwork/api/Checks/#Invisible "Direct link to Invisible") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L107) `Checks.``Invisible``(` `_self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Part:` `[BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart)` \-- The part you want to check `) →` `(``)` Returns `true` if the [Part.Transparency](https://developer.roblox.com/en-us/api-reference/class/Part#Transparency) property is equal to `1` (invisible). ### `TeamPlayer`[​](https://stefanuk12.github.io/aimwork/api/Checks/#TeamPlayer "Direct link to TeamPlayer") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L115) `Checks.``TeamPlayer``(` `_self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the `Player`'s [Team](https://developer.roblox.com/en-us/api-reference/class/Team) is the same as the [Players.LocalPlayer](https://developer.roblox.com/en-us/api-reference/class/Players#LocalPlayer) 's [Team](https://developer.roblox.com/en-us/api-reference/class/Team) . ### `IgnoredPlayer`[​](https://stefanuk12.github.io/aimwork/api/Checks/#IgnoredPlayer "Direct link to IgnoredPlayer") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L124) `Checks.``IgnoredPlayer``(` `self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the `Player` is "ignored" within the configuration. ### `IgnoredTeam`[​](https://stefanuk12.github.io/aimwork/api/Checks/#IgnoredTeam "Direct link to IgnoredTeam") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L141) `Checks.``IgnoredTeam``(` `self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the `Player`'s team is "ignored" within the configuration. ### `Ignored`[​](https://stefanuk12.github.io/aimwork/api/Checks/#Ignored "Direct link to Ignored") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L157) `Checks.``Ignored``(` `self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `(``)` Returns `true` if the `Player` and their team is ignored within the configuration. ### `WallHit`[​](https://stefanuk12.github.io/aimwork/api/Checks/#WallHit "Direct link to WallHit") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L168) `Checks.``WallHit``(` `self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``,` `Part:` `[BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart)` `,` `PartAncestor:` `[Instance](https://developer.roblox.com/en-us/api-reference/datatype/Instance)` `,`\-- Used to ensure the `Part` hit is apart of the `Player` `CurrentCamera:` `[Camera](https://developer.roblox.com/en-us/api-reference/class/Camera) ` `) →` `(``)` Checks if the `Part` is visible, if a ray was fired from our [Camera](https://developer.roblox.com/en-us/api-reference/class/Camera) 's position. ### `PlayerCheck`[​](https://stefanuk12.github.io/aimwork/api/Checks/#PlayerCheck "Direct link to PlayerCheck") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L195) `Checks.``PlayerCheck``(` `self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) `\-- The player you want to check `) →` `boolean` Returns `true` if the Player is valid. ### `PartChecks`[​](https://stefanuk12.github.io/aimwork/api/Checks/#PartChecks "Direct link to PartChecks") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/checks.luau#L209) `Checks.``PartChecks``(` `self:` `[Checks](https://stefanuk12.github.io/aimwork/api/Checks) ``,` `Player:` `[PlayerObject](https://stefanuk12.github.io/aimwork/api/PlayerObject) ``,` `Part:` `[BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart)` `,` `Selected:` `[AimworkSelected](https://stefanuk12.github.io/aimwork/api/Aimwork#AimworkSelected) ` `) →` `(``)` Performs all the necessary checks and calculations for the `Part`, setting the properties inside of `Selected`, if it's a valid `Part` as determined by previous checks. Show raw api { "functions": \[\ {\ "name": "new",\ "desc": "Constructs a new \[Checks\] object.\\n\\n ",\ "params": \[\ {\ "name": "FOV",\ "desc": "",\ "lua\_type": "FOVObject"\ },\ {\ "name": "Config",\ "desc": "",\ "lua\_type": "Configuration"\ }\ \],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "Checks\\n"\ }\ \],\ "function\_type": "static",\ "tags": \[\ "constructor"\ \],\ "source": {\ "line": 55,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "Destroy",\ "desc": "Cleans up, then destroys this object.\\n> Note that you cannot use this object anymore, it's set to \`nil\`.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "tags": \[\ "destructor"\ \],\ "source": {\ "line": 74,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "ForceField",\ "desc": "Returns \`true\` if the \[Player\] has a \[ForceField\].\\n\\n ",\ "params": \[\ {\ "name": "\_self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 83,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "Friend",\ "desc": "Returns \`true\` if the \[Player\] is a friend to the \[Player.LocalPlayer\].\\n\\n ",\ "params": \[\ {\ "name": "\_self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 91,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "Health",\ "desc": "Returns \`true\` if the \`Player\` has a health \*\*above\*\* 0.\\n\\n ",\ "params": \[\ {\ "name": "\_self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 99,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "Invisible",\ "desc": "Returns \`true\` if the \[Part.Transparency\] property is equal to \`1\` (invisible).\\n\\n ",\ "params": \[\ {\ "name": "\_self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Part",\ "desc": "The part you want to check",\ "lua\_type": "BasePart"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 107,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "TeamPlayer",\ "desc": "Returns \`true\` if the \`Player\`'s \[Team\] is the same as the \[Players.LocalPlayer\]'s \[Team\].\\n\\n ",\ "params": \[\ {\ "name": "\_self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 115,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "IgnoredPlayer",\ "desc": "Returns \`true\` if the \`Player\` is \\"ignored\\" within the configuration.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 124,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "IgnoredTeam",\ "desc": "Returns \`true\` if the \`Player\`'s team is \\"ignored\\" within the configuration.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 141,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "Ignored",\ "desc": "Returns \`true\` if the \`Player\` and their team is ignored within the configuration.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 157,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "WallHit",\ "desc": "Checks if the \`Part\` is visible, if a ray was fired from our \[Camera\]'s position.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "PlayerObject"\ },\ {\ "name": "Part",\ "desc": "",\ "lua\_type": "BasePart"\ },\ {\ "name": "PartAncestor",\ "desc": "Used to ensure the \`Part\` hit is apart of the \`Player\`",\ "lua\_type": "Instance"\ },\ {\ "name": "CurrentCamera",\ "desc": "",\ "lua\_type": "Camera\\n"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 168,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "PlayerCheck",\ "desc": "Returns \`true\` if the Player is valid.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "The player you want to check",\ "lua\_type": "PlayerObject"\ }\ \],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "boolean\\n"\ }\ \],\ "function\_type": "static",\ "source": {\ "line": 195,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "PartChecks",\ "desc": "Performs all the necessary checks and calculations for the \`Part\`, setting the properties inside of \`Selected\`, if it's a valid \`Part\` as determined by previous checks.\\n \\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "Checks"\ },\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "PlayerObject"\ },\ {\ "name": "Part",\ "desc": "",\ "lua\_type": "BasePart"\ },\ {\ "name": "Selected",\ "desc": "",\ "lua\_type": "AimworkSelected"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 209,\ "path": "src/modules/checks.luau"\ }\ }\ \], "properties": \[\ {\ "name": "PlayerTracker",\ "desc": "Used internally to track the status of all \[Player\]s",\ "lua\_type": "PlayerTracker",\ "source": {\ "line": 29,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "FOV",\ "desc": "Holds all FOV-related data, including methods that help with checking if a \[Vector2\] point in inside of the FOV.",\ "lua\_type": "FOVObject",\ "source": {\ "line": 34,\ "path": "src/modules/checks.luau"\ }\ },\ {\ "name": "Configuration",\ "desc": "Contains the entire configuration, however, only certain parts are used.",\ "lua\_type": "Configuration",\ "source": {\ "line": 39,\ "path": "src/modules/checks.luau"\ }\ }\ \], "types": \[\], "name": "Checks", "desc": "Handles any Aimwork checks to check if we can target a specific \[Player\]/\[Part\].", "source": { "line": 24, "path": "src/modules/checks.luau" } } * [Properties](https://stefanuk12.github.io/aimwork/api/Checks/#properties) * [Configuration](https://stefanuk12.github.io/aimwork/api/Checks/#Configuration) * [FOV](https://stefanuk12.github.io/aimwork/api/Checks/#FOV) * [PlayerTracker](https://stefanuk12.github.io/aimwork/api/Checks/#PlayerTracker) * [Functions](https://stefanuk12.github.io/aimwork/api/Checks/#functions) * [Constructor](https://stefanuk12.github.io/aimwork/api/Checks/#constructor) * [.new](https://stefanuk12.github.io/aimwork/api/Checks/#new) * [Destructor](https://stefanuk12.github.io/aimwork/api/Checks/#destructor) * [.Destroy](https://stefanuk12.github.io/aimwork/api/Checks/#Destroy) * [.ForceField](https://stefanuk12.github.io/aimwork/api/Checks/#ForceField) * [.Friend](https://stefanuk12.github.io/aimwork/api/Checks/#Friend) * [.Health](https://stefanuk12.github.io/aimwork/api/Checks/#Health) * [.Ignored](https://stefanuk12.github.io/aimwork/api/Checks/#Ignored) * [.IgnoredPlayer](https://stefanuk12.github.io/aimwork/api/Checks/#IgnoredPlayer) * [.IgnoredTeam](https://stefanuk12.github.io/aimwork/api/Checks/#IgnoredTeam) * [.Invisible](https://stefanuk12.github.io/aimwork/api/Checks/#Invisible) * [.PartChecks](https://stefanuk12.github.io/aimwork/api/Checks/#PartChecks) * [.PlayerCheck](https://stefanuk12.github.io/aimwork/api/Checks/#PlayerCheck) * [.TeamPlayer](https://stefanuk12.github.io/aimwork/api/Checks/#TeamPlayer) * [.WallHit](https://stefanuk12.github.io/aimwork/api/Checks/#WallHit) --- # FOVObject | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/api/FOVObject/#__docusaurus_skipToContent_fallback) On this page Properties[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#properties "Direct link to Properties") ---------------------------------------------------------------------------------------------------------- ### `Drawing`[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#Drawing "Direct link to Drawing") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/fov_object.luau#L28) `FOVObject.Drawing:` `DrawingEnumWithData` Holds the Drawing object and its related data. Functions[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#functions "Direct link to Functions") ------------------------------------------------------------------------------------------------------- ### `new`[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#new "Direct link to new") constructor [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/fov_object.luau#L126) `FOVObject.``new``(``DrawingData:` `DrawingOptionalDataEnum``) →` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ` Constructs a new [FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) . ### `CreateDrawing`[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#CreateDrawing "Direct link to CreateDrawing") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/fov_object.luau#L150) `FOVObject.``CreateDrawing``(``self:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ``) →` `(``)` Used during [FOVObject.new](https://stefanuk12.github.io/aimwork/api/FOVObject#new) to create the \[Drawing\] object, if the library is available. ### `SetDrawingData`[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#SetDrawingData "Direct link to SetDrawingData") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/fov_object.luau#L163) `FOVObject.``SetDrawingData``(``self:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ``) →` `(``)` Applies all of the settings stored internally in `self.Drawing.Value` to the actual Drawing object, if it exists. ### `Update`[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#Update "Direct link to Update") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/fov_object.luau#L177) `FOVObject.``Update``(``self:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ``) →` `(``)` Updates the internal data and attempts to update the internal Drawing object with the new data. ### `InsideFOV`[​](https://stefanuk12.github.io/aimwork/api/FOVObject/#InsideFOV "Direct link to InsideFOV") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/modules/fov_object.luau#L195) `FOVObject.``InsideFOV``(` `self:` `[FOVObject](https://stefanuk12.github.io/aimwork/api/FOVObject) ``,` `Position:` `[Vector2](https://developer.roblox.com/en-us/api-reference/datatype/Vector2) ` `) →` `number?`\-- The distance from the centre of the FOV Checks if a [Vector2](https://developer.roblox.com/en-us/api-reference/datatype/Vector2) point is inside of the FOV. Show raw api { "functions": \[\ {\ "name": "new",\ "desc": "Constructs a new \[FOVObject\].\\n\\n ",\ "params": \[\ {\ "name": "DrawingData",\ "desc": "",\ "lua\_type": "DrawingOptionalDataEnum"\ }\ \],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "FOVObject\\n"\ }\ \],\ "function\_type": "static",\ "tags": \[\ "constructor"\ \],\ "source": {\ "line": 126,\ "path": "src/modules/fov\_object.luau"\ }\ },\ {\ "name": "CreateDrawing",\ "desc": "Used during \[FOVObject.new\] to create the \[Drawing\] object, if the library is available.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "FOVObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 150,\ "path": "src/modules/fov\_object.luau"\ }\ },\ {\ "name": "SetDrawingData",\ "desc": "Applies all of the settings stored internally in \`self.Drawing.Value\` to the actual Drawing object, if it exists.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "FOVObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 163,\ "path": "src/modules/fov\_object.luau"\ }\ },\ {\ "name": "Update",\ "desc": "Updates the internal data and attempts to update the internal Drawing object with the new data.\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "FOVObject"\ }\ \],\ "returns": \[\],\ "function\_type": "static",\ "source": {\ "line": 177,\ "path": "src/modules/fov\_object.luau"\ }\ },\ {\ "name": "InsideFOV",\ "desc": "Checks if a \[Vector2\] point is inside of the FOV.\\n\\n ",\ "params": \[\ {\ "name": "self",\ "desc": "",\ "lua\_type": "FOVObject"\ },\ {\ "name": "Position",\ "desc": "",\ "lua\_type": "Vector2"\ }\ \],\ "returns": \[\ {\ "desc": "The distance from the centre of the FOV",\ "lua\_type": "number?"\ }\ \],\ "function\_type": "static",\ "source": {\ "line": 195,\ "path": "src/modules/fov\_object.luau"\ }\ }\ \], "properties": \[\ {\ "name": "Drawing",\ "desc": "Holds the Drawing object and its related data.",\ "lua\_type": "DrawingEnumWithData",\ "source": {\ "line": 28,\ "path": "src/modules/fov\_object.luau"\ }\ }\ \], "types": \[\], "name": "FOVObject", "desc": "Handles updating and rendering the FOV while providing methods to check if a \[Vector2\] point is inside.", "source": { "line": 23, "path": "src/modules/fov\_object.luau" } } * [Properties](https://stefanuk12.github.io/aimwork/api/FOVObject/#properties) * [Drawing](https://stefanuk12.github.io/aimwork/api/FOVObject/#Drawing) * [Functions](https://stefanuk12.github.io/aimwork/api/FOVObject/#functions) * [Constructor](https://stefanuk12.github.io/aimwork/api/FOVObject/#constructor) * [.new](https://stefanuk12.github.io/aimwork/api/FOVObject/#new) * [.CreateDrawing](https://stefanuk12.github.io/aimwork/api/FOVObject/#CreateDrawing) * [.InsideFOV](https://stefanuk12.github.io/aimwork/api/FOVObject/#InsideFOV) * [.SetDrawingData](https://stefanuk12.github.io/aimwork/api/FOVObject/#SetDrawingData) * [.Update](https://stefanuk12.github.io/aimwork/api/FOVObject/#Update) --- # Functions | Aimwork [Skip to main content](https://stefanuk12.github.io/aimwork/api/Functions/#__docusaurus_skipToContent_fallback) On this page Functions[​](https://stefanuk12.github.io/aimwork/api/Functions/#functions "Direct link to Functions") ------------------------------------------------------------------------------------------------------- ### `GetCharacter`[​](https://stefanuk12.github.io/aimwork/api/Functions/#GetCharacter "Direct link to GetCharacter") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/functions/get_character.luau#L9) `Functions.``GetCharacter``(``Player:` `[Player](https://developer.roblox.com/en-us/api-reference/class/Player)` `) →` `[Model?](https://developer.roblox.com/en-us/api-reference/class/Model) ` Returns the Character associated with a `Player` ### `MergeTables`[​](https://stefanuk12.github.io/aimwork/api/Functions/#MergeTables "Direct link to MergeTables") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/functions/merge_tables.luau#L10) `Functions.``MergeTables``(` `Destination:` `table``,`\-- The destination table to merge the properties onto `Source:` `table`\-- The source table to get the properties from `) →` `table`\-- The destination table with the merged properties from the source table Merges all the properties of `Source` onto `Destination` ### `GetCurrentCamera`[​](https://stefanuk12.github.io/aimwork/api/Functions/#GetCurrentCamera "Direct link to GetCurrentCamera") [](https://github.com/Stefanuk12/Aimwork/blob/master/src/functions/get_current_camera.luau#L11) `Functions.``GetCurrentCamera``(``) →` `[Camera](https://developer.roblox.com/en-us/api-reference/class/Camera) ` Returns the `CurrentCamera` Show raw api { "functions": \[\ {\ "name": "GetCharacter",\ "desc": "Returns the Character associated with a \`Player\`",\ "params": \[\ {\ "name": "Player",\ "desc": "",\ "lua\_type": "Player"\ }\ \],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "Model?"\ }\ \],\ "function\_type": "static",\ "source": {\ "line": 9,\ "path": "src/functions/get\_character.luau"\ }\ },\ {\ "name": "MergeTables",\ "desc": "Merges all the properties of \`Source\` onto \`Destination\`",\ "params": \[\ {\ "name": "Destination",\ "desc": "The destination table to merge the properties onto",\ "lua\_type": "table"\ },\ {\ "name": "Source",\ "desc": "The source table to get the properties from",\ "lua\_type": "table"\ }\ \],\ "returns": \[\ {\ "desc": "The destination table with the merged properties from the source table",\ "lua\_type": "table"\ }\ \],\ "function\_type": "static",\ "source": {\ "line": 10,\ "path": "src/functions/merge\_tables.luau"\ }\ },\ {\ "name": "GetCurrentCamera",\ "desc": "Returns the \`CurrentCamera\`",\ "params": \[\],\ "returns": \[\ {\ "desc": "",\ "lua\_type": "Camera"\ }\ \],\ "function\_type": "static",\ "source": {\ "line": 11,\ "path": "src/functions/get\_current\_camera.luau"\ }\ }\ \], "properties": \[\], "types": \[\], "name": "Functions", "desc": "Contains any miscellaneous functions that may be used across many files", "source": { "line": 6, "path": "src/functions/init.luau" } } * [Functions](https://stefanuk12.github.io/aimwork/api/Functions/#functions) * [.GetCharacter](https://stefanuk12.github.io/aimwork/api/Functions/#GetCharacter) * [.GetCurrentCamera](https://stefanuk12.github.io/aimwork/api/Functions/#GetCurrentCamera) * [.MergeTables](https://stefanuk12.github.io/aimwork/api/Functions/#MergeTables) ---