Skip to content

Participant

A Participant represents a player in the round. You can get a Participant using the GetParticipant API.

Type: "Participant"

Always set to “Participant”. Used to differentiate between classes.

Type: Extras

Extra data for the participant.

Type: Player

The player associated with this participant.

Type: Round

The round that this participant is in.

Type: {Participant}

A list of participants that have voted to slay this participant after being RDMed by them.

Type: Corpse?

The corpse of this participant. Will always be nil if the participant is not dead.

Type: {CorpseIcon}

A list of additional corpse icons for this participant.

Type: number

The max distance that the participant can interact with a corpse from.

Type: {Participant}

A list of participants that this participant has killed.

Type: ScoreTable

A table of scores for this participant.

Type: ItemPurchases

A table of items that this participant has purchased, to the number of times they have done so.

Attempts to add a slay vote to the participant. Will fail if the voter has already voted against this participant, or if the voter was not RDMed by this participant.

NameTypeDefaultDescription
voterParticipantThe participant that is voting to slay this participant.

boolean

Attempts to play an animation on the participant’s character.

NameTypeDefaultDescription
animationIdnumberThe ID of the animation to play.
animationNamestringThe name of the animation.

()

Attempts to stop the animation with the given name on the participant’s character.

NameTypeDefaultDescription
animationNamestringThe name of the animation to stop.

()

Returns the karma of the participant. Returns 1000 if karma is not enabled in the current gamemode.

number

Sets the karma of the participant. No effect if karma is disabled in the current gamemode.

Karma is clamped between 1 and 1000. If a non-integer value is specified, it will be rounded down. If a non-finite value (NaN or infinite) is used, an error will be thrown.

NameTypeDefaultDescription
karmanumberThe karma to set.

()

Returns true if the participant is a free kill.

boolean

Sets the free kill reason of the participant. Sends a chat message to the participant with the given reason, in the form “Because you {reason}, you are now a free kill!”.

NameTypeDefaultDescription
reasonstring?The reason to set, or nil if the participant should no longer be a free kill.

()

Returns the role of the participant. If the Participant has not yet been assigned a role, returns the default role as defined by the game (not the gamemode).

string

Sets the role of the participant to the given role definition. Unsets the role if no definition is given.

NameTypeDefaultDescription
roleDefinitionRoleDefinition?The role definition. Unsets the role if nil.

()

Returns true if the participant’s role is evil. The default role is not set to be evil.

boolean

Returns true if the participant is allied with the given participant.

NameTypeDefaultDescription
participantParticipantThe participant to check.

boolean

Returns true if the participant is justified to deal damage to the given participant. Damage is justified if the participant is not allied with the target, or if the participant has self-defense against the target.

NameTypeDefaultDescription
targetParticipantThe participant to check.

boolean

Returns the participant’s username, formatted with their role colour.

string

Returns true if the participant already has a corpse icon of the specified name.

NameTypeDefaultDescription
corpseIconNamestringThe name of the corpse icon.

boolean

Adds a corpse icon when the participant is killed. This should be called before the participant is killed.

NameTypeDefaultDescription
corpseIconCorpseIconThe corpse icon to add.

()

Returns the participant’s character. Returns nil if the participant has no character.

Model?

Returns the participant’s humanoid. Returns nil if the participant has no humanoid.

Humanoid?

Spawns or respawns the participant’s character. The character will spawn at a random PlayerSpawn in the map, unless a morph is specified. This first calls DespawnCharacter.

Additionally, this method will reset the self-defense, slay votes, free kill status, and kill list of the participant, unless preserve is true.

NameTypeDefaultDescription
morphModel?A character model to use.
preserveboolean?If true, participant data will not be reset.

()

Despawns the participant’s character, additionally dropping their items and clearing their ammo, unless preserve is true. No effect if the participant has no character.

NameTypeDefaultDescription
preserveboolean?If true, participant data will not be reset.

()

Adds a self-defense entry against the specified participant for the specified duration.

NameTypeDefaultDescription
paramsSelfDefenseParamsThe params.

()

Returns true if the participant has self-defense against the specified participant.

NameTypeDefaultDescription
participantParticipantThe participant to check.

boolean

Sets the participant’s last attacker for the specified duration. If the participant dies to environmental causes within the specified duration, their death will be attributed to the attacker.

NameTypeDefaultDescription
attackerParticipantThe attacker.
durationnumberThe duration.

()

Adds the specified amount of score, for the specified reason, to the Participant. If a non-integer value is used, the amount will be rounded down.

Throws an error if amount is not finite (NaN or infinite).

NameTypeDefaultDescription
reasonstringThe reason.
amountnumberThe amount. Can be negative.

()

Adds the specified amount of credits to the Participant.

NameTypeDefaultDescription
amountnumberThe amount. Can be negative.

()

Sets the participant’s credits to the specified amount.

NameTypeDefaultDescription
amountnumberThe amount.

()

Attempts to drop an ammo box for the participant’s current item. Will fail if no item is held or if the current item cannot drop an ammo box.

()

Returns the participant’s currently equipped item. Returns nil if the participant has no item equipped.

AnyItem?

Attempt to set the participant’s currently equipped item.

NameTypeDefaultDescription
itemAnyItemThe item.
forceboolean?Whether to force set the item, bypassing prevent unequip if the currently equipped item has it.

()

Returns a table of the item name to the item, for all items in the participant’s inventory.

{[string]: AnyItem}

Gives the specified item to the participant. Will error if the item cannot be given.

NameTypeDefaultDescription
itemDefinitionItemDefinitionThe item definition.

()

Attempts to drop the specified item. Will fail if the item cannot be dropped.

NameTypeDefaultDescription
itemAnyItemThe item.
throwDirectionVector3?The direction to throw the item.

()

Adds the item to the participant’s inventory. Will error if the slot is already occupied.

NameTypeDefaultDescription
itemAnyItemThe item.

()

Removes the item from the participant’s inventory.

NameTypeDefaultDescription
itemAnyItemThe item.

()

Attempts to drop the specified item. If unsuccessful, removes the item instead. Returns true if the item was dropped.

NameTypeDefaultDescription
itemAnyItemThe item.
throwboolean?Whether to apply a throwing force or not.

boolean

Returns AnyItem occupying the specified group. Returns nil if the group is empty.

NameTypeDefaultDescription
itemGroupItemGroup?The item group. If nil, this method will always return nil.

AnyItem?

Returns the amount of the specified ammo type the participant has. Returns 0 for invalid ammo types.

NameTypeDefaultDescription
ammoTypestringThe ammo type.

number

Sets the amount of the specified ammo type the participant has.

NameTypeDefaultDescription
ammoTypestringThe ammo type.
amountnumberThe amount.

()

Returns a table of the ammo type to the amount of ammo the participant has.

{[string]: number}

Returns true if the participant has a weapon with the specified ammo type.

NameTypeDefaultDescription
ammoTypestringThe ammo type.

boolean

Attempts to purchase the specified item definition. Returns an ItemPurchaseResult.

NameTypeDefaultDescription
itemDefinitionItemDefinitionThe item definition.

ItemPurchaseResult

Returns the status of the participant.

ParticipantStatus

Returns true if the participant is alive.

boolean

Attempts to deal damage, with the specified parameters. Returns true if the damage was successful.

NameTypeDefaultDescription
paramsDamageParamsThe damage parameters.

boolean

Returns the health of the participant. Returns 0 if the participant has no humanoid.

number

Sets the health of the participant. Will automatically set the Humanoid.MaxHealth if needed.

NameTypeDefaultDescription
healthnumberThe health.

()

Teleports the participant to a PlayerSpawn on the map.

()

Attempts to throw the specified assembly. Returns true if successful.

NameTypeDefaultDescription
assemblyAssemblyThe assembly.
forcenumberThe force of the throw.
parentInstance?The parent to set for the assembly.
positionVector3?The initial position of the assembly.
directionVector3?The direction to throw the assembly.
noForwardboolean?Whether to teleport the assembly slightly in-front of the participant.
noAngularImpulseboolean?If true, the throw assembly will not receive a random angular impulse.

boolean