Player

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

Attention

This page is under construction.

Constructors

You cannot Spawn or Destroy Players.

Functions

Returns

Name

Description

number

GetPing()

Returns the ping of a player

Character

GetControlledCharacter()

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

server-only-label

Possess(Character NewCharacter)

Bind the Player to a Character

server-only-label

UnPossess()

Release the Player from the Character

client-only-label

boolean

IsLocalPlayer()

Returns if this is the LocalPlayer

SetCameraRotation(Rotator)

Sets the Player’s Camera Rotation

SetCameraLocation(Vector)

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

server-only-label

Kick(string Reason)

Kicks the player from the server

server-only-label

Ban(string Reason)

Bans the player from the server

boolean

IsValid()

Returns if this is Valid

string

GetType()

Returns the type of this Actor

SetValue(string Key, any Value)

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

any

GetValue(string Key)

Gets a value given a key

Events

Name

Arguments

Description

Possess

Player player, Character character

A Player was bound to a Character

UnPossess

Player player, Character character, boolean bIsPlayerDisconnecting

A Character was released from the Player

Examples