The static global Player class contains representations of all players as colors, i.e. “White”. This class has member variables and functions related to the Players’ pointers, hands, blindfolds, etc. For example, to get a reference to Player White, use Player.White or Player[“White”]. If a player is seated at color White, then Player.White.seated will be true.

List of Player Colors

Member Variables

TypeVariable NameDescription
booladminIs the player currently promoted or hosting the game? Read only.
boolblindfoldedIs the player blindfolded? Setting this will blindfold or remove the blindfold on the player.
stringcolorThe player’s color. Read only.
boolhost Is the player the host?
floatlift_heightThe player’s lift height from 0 to 1.
boolpromotedIs the player currently promoted?
boolseatedIs the player currently seated at the table? Read only.
stringsteam_idThe player’s Steam ID. Read only.
stringsteam_nameThe player’s Steam name. Read only.
stringteamThe player’s team. (None, Clubs, Diamonds, Hearts, Spades)


Return ValueFunction NameDescription
boolattachCameraToObject( Table parameters ) Makes a player’s camera follow an Object.

Parameters Table:

local parameters = {}
parameters.object = Object object_to_attach_to
parameters.offset = {float x, float y, float z} –Optional
boolchangeColor(string color)Change the player to this color.
TablegetHandObjects()Returns a Lua Table as a list of all the Cards and Mahjong Tiles in the player’s hand.
TablegetPlayerHand()Returns a Lua Table with the position and rotation of the given player’s hand. The values in the returned Table are keyed as:
















The trigger vectors are a coordinate system taking into account the rotation of the player’s hand. This is useful when you want to get a position right in front or next to a player’s hand. See the BlackJack example and how the cards are dealt and how the poker chips are spawned. Returns nil if there is no player assigned to that color.

TablegetPointerPosition()Returns the position of the given player color’s pointer. The returned Table is keyed as Table[‘x’], Table[‘y’], and Table[‘z’]. Returns nil if the color there is no player assigned to that color.
floatgetPointerRotation()Returns the y-axis rotation of the given player color’s pointer in degrees. This is also essentially the y-axis direction that the player’s camera is facing. Returns nil if there is no player assigned to that color.
boolkick()Kicks a player.
boollookAt( Table parameters ) Moves the Player’s camera to look at a specific point. This function forces the Player into the third person mode.

Parameters Table:

local parameters = {}
parameters.position = {float x, float y, float z}
parameters.pitch = float pitch –Optional
parameters.yaw = float yaw –Optional
parameters.distance = float distance –Optional
boolmute()Mutes a player so they cannot use voice chat. Call again to unmute.
boolpromote()Promotes a player. Call again to demote.