game
Interact with Roblox.
When using the Game API the info is returned directly from memory. It's strongly advised that these functions are never called within the paint callback. Calling these functions within the paint callback, may cause unexpected performance drops. Querying the game's memory is expensive, and doing it every frame is not optimal.
Functions:
Data Model
Returns an instance. Every place is represented by a data model, a hierarchy of objects that describe everything about the place.
Camera Position
returns the position of the camera as x,y, z
Place ID
Returns the game's place id.
Get Workspace
Returns an Instance that's class is Workspace.
Get Players
Returns an Instance that's class is Players.
Get Local Player
Returns an instance to the local player.
Is Focused
Returns true if the game is in focus.
Methods:
These can be used on instances, anything in the game is considered an instance automatically. There are different type of instances (ex. Part, MeshPart, Player, Workspace, Camera, etc...)
Get Children
Returns an array containing all of the instance's direct children.
Get Descendants
Returns an array that contains all of the descendants of that object.
Get Parent
Returns a parent instance to the provided instance.
Get Class Name
Returns the class name of instance.
Get Name
Returns the name of the instance.
Set Name
Sets the name of the instance.
Find First Child
Returns a child instance with the provided name.
Find First Child Of Class
Returns a child instance with the provided class name.
Get Button Position
Returns two float values of the position.
Get Button Size
Returns two float values of the size of the instance.
Set Button Size
Takes a vector as an argument and sets the size of the button. The vector should be formatted as (sizex, sizey, 0)
Is A
Returns true if the instance is the compared class name.
Get Proximity Prompt Hold Duration
Returns float value of the hold duration of a Proximity Prompt.
Set Proximity Prompt Hold Duration
Sets the hold duration of a Proxmity Prompt to a float value.
Get Frame "Visible" Flag
Returns an int value. 256 = Visible, 0 = Not Visible.
Get TextLabel Value
Returns string value from the TextLabel.
Get String Value
Returns string value.
Set String Value
sets the value of the instance to a string.
Get Number Value
Returns number value.
Get Int Value
Returns integer value.
Set Number Value
Set Int Value
Part & Mesh Part Methods:
Get Position
Returns the position as 3 floats
Set Position
Takes in a vector and sets the position of an instance
Get Velocity
Returns the velocity as (x, y, z). You can create a vector instance and get the length of it, to get the value as an number.
Get Look Vector
Returns the look vector as 3 floats.
Set Look Vector
Takes a vector as an argument and writes to the Look Vector inside CFrame
Get Color
Returns an integer value of color for the instance
Set Color
Sets the color of the instance to the integer value. Here are some colors we went ahead and reversed for you:
12517631 - hot pink 0-black 65535 - yellow 255 - red 16777215 - white 16715423 - magenta 15826715 - electric blue 454912 - lime green 2588109 - orange
Get Size
Returns x, y, z of the size of the instance
Set Size
Overrides the instances size with the values passed. Takes a vector
Get Material
Returns an integer value.
Set Material
Overrides the instances material with the selected material.
For a list of Materials, check here: https://pastebin.com/H0X9Nz2c
Get Mesh ID
Returns the mesh id as a string.
Set Mesh ID
Sets the mesh id of a part.
Set Highlight Occlusion
Sets the instance (a highlight) to AlwaysOnTop
Set Highlight Transparency
Takes a float as an arg and sets the instance's tranparency.
Humanoid Methods:
Get Move Direction
Returns the move direction as x, y, z.
Get Health
Returns the health value as a number.
Get Max Health
Returns the maximum health value as a number.
Player Methods:
Get Character
Returns the character of that instance.
Get Team
Returns the team name.
Get User ID
Returns the user id as a number.
Last updated