Player
Player
is a class which holds individual player data
Instance.new()
This class inherits ActiveInstance
which means that all properties, functions and signals from ActiveInstance can be used.
Properties
username: string
Username property holds a string with the username of a player
userId: int
userId property holds a string with the userId of a player
health: int
Health property holds a int with the health of a player
admin: bool
Admin property holds a bool value which tells if the player is a cubern admin or not
developer: bool
Developer property holds a bool value which tells if a player is the creator of the current game
PremiumUser: bool
PremiumUser property holds a bool value which tells if a player is subscribed to cuberns membership
JumpPower: float
JumpPower property holds a float value which is the jump power of a player. This can only be changed by the server.
WalkSpeed: float
WalkSpeed property holds a float value which is the walk speed of a player. This can only be changed by the server.
Sitting: bool
Sitting property holds a bool value which tells if a player is sitting or not.
Avatar: Array
Holds avatar data. Like:
Functions
Kill()
This function can only be called by server sided scripts and client sided scripts but only for localPlayer. An example:
Kick(string message)
This function can only be called by server sided scripts. An example:
Respawn()
This function can only be called by server sided scripts and client sided scripts but only for localPlayer. An example:
OwnsItem(int ItemId)
This function can only be called by server-sided scripts. An example:
ClearAvatar()
This function can only be called by server-sided scripts. It is used to completely clear out the avatar of a user to default avatar with no cosmetics. An example:
Sit(Seat seat = null)
The sit function can recieve a optional parameter which would point to the seat a player would sit on. If nothing is given then the player will sit down at the place it was standing at. This can be called by server sided scripts and client sided scripts but only for localPlayer An example:
StandUp()
The standup function will make the player stand up if the player was sitting. An example:
Signals
OnDeath
This signal is called when a player dies. An example:
OnRespawned
This signal is called when a player respawns after death. An example: