Player

Players are Entities that represents the individual behind the mouse and keyboard. Players are spawned automatically when connected to the server.

Constructors

You cannot Spawn or Destroy Players.

Functions

Returns

Name

Description

server-only-label

Ban(string Reason)

Bans the player from the server

server-only-label

Kick(string Reason)

Kicks the player from the server

server-only-label

Possess(Character NewCharacter)

Bind the Player to a Character

SetCameraLocation(Vector)

Sets the Player’s Camera Location (only works if not possessing any Character)

SetCameraRotation(Rotator)

Sets the Player’s Camera Rotation

server-only-label

SetName(string)

Sets the player’s name

SetValue(string Key, any Value)

Sets a value in this entity, which can be accessed by any package (local only)

server-only-label

SetVOIPChannel(number Channel)

Sets the VOIP Channel of this Player (will only communicate with other players in the same channel)

server-only-label

SetVOIPMuted(boolean IsMuted)

Mutes/Unmutes this Player

server-only-label

UnPossess()

Release the Player from the Character

string

GetAccountID()

Currently this is not the real Account ID. This ID is generated based on Player’s IP which can be used for now to identify Players during a short period (until his IP changes). This is a temporary solution while our Account System isn’t fully integrated.

Character

GetControlledCharacter()

Returns the character of the player. If the player has not yet been assigned a character, nil is returned.

number

GetID()

Gets the network ID of this entity (same in both client and server)

string

GetIP()

Gets the IP of this Player

string

GetName()

Returns the player’s name

number

GetPing()

Returns the ping of a player

string

GetType()

Returns the type of this Actor

number

GetVOIPChannel()

Returns the VOIP Channel of this Player

any

GetValue(string Key)

Gets a value given a key

client-only-label

boolean

IsLocalPlayer()

Returns if this is the LocalPlayer

boolean

IsValid()

Returns if this is Valid

boolean

IsVOIPMuted()

Returns if this Player is muted (VOIP)

Events

Name

Arguments

Description

Destroy

Player player

Triggered when Player disconnects from the server

Possess

Player player, Character character

A Player was bound to a Character

Spawn

Player player

Triggered when Player connects to the server

server-only-label

Ready

Player player

Triggered when Player is ready (i.e. fully loaded and ready to play)

UnPossess

Player player, Character character, boolean bIsPlayerDisconnecting

A Character was released from the Player

VOIP

Player player, boolean IsTalking

When a Player starts/ends using VOIP