Role
A loaded role. You can get a Role object using Round:GetRoleFromRoleName(), or through Participant:GetRole().
See also: Gamemodes.RoleDefinition.
Properties
Section titled “Properties”Type: "Role"
Always set to “Role”. Used to differentiate between classes.
Definition
Section titled “Definition”Type: RoleDefinition
The RoleDefinition of the role.
Methods
Section titled “Methods”IsAlliedWith
Section titled “IsAlliedWith”Returns true if the role is allied with the given role.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
role | Role | The role to check. |
Returns
Section titled “Returns”boolean
GetFormattedName
Section titled “GetFormattedName”Returns the name of the role, formatted with the role color using rich text.
Returns
Section titled “Returns”string
GetPluralName
Section titled “GetPluralName”Returns the plural form of the role name, unformatted.
Returns
Section titled “Returns”string
GetExclamatoryString
Section titled “GetExclamatoryString”Returns "!" if RoleDefinition.IsExclamatory is true, "." otherwise.
Returns
Section titled “Returns”string
FormatString
Section titled “FormatString”Returns the string, formatted with the role color using rich text.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
str | string | The string to format. |
Returns
Section titled “Returns”string