AutoColorCharacters (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "</code>" to "</SyntaxHighlight>"
Tags: mobile web edit mobile edit
Added the reason why this does nothing
 
(3 intermediate revisions by one other user not shown)
Line 2: Line 2:
|name = AutoColorCharacters
|name = AutoColorCharacters
|type = bool
|type = bool
|description = A value that sets whether players on the team wear the team colors automatically.
|description = A value that sets whether players on the team wear the team colors automatically. This property has no effect because the Animate script (which colors the characters) does not check it.
|object = Team
|object = Team
}}</onlyinclude>
}}</onlyinclude>
Line 9: Line 9:


{{Example|
{{Example|
This causes the players' character's colors to stay the same
This should leave the character colors unchanged:
<code lua>
<syntaxhighlight lang="lua" line>
game:GetService('Teams').Team.AutoColorCharacters = false
local Teams = game:GetService("Teams")
</SyntaxHighlight>
Teams.Team.AutoColorCharacters = false
This causes the players' character's limbs to change to ''Black'', their Heads to change to ''Bright Yellow'', and their Torsoes to change to their TeamColor.
</syntaxhighlight>
<code lua>
This should cause the character limbs to change to ''Black'', their Heads to change to ''Bright yellow'', and their Torsos to change to their TeamColor:
game:GetService('Teams').Team.AutoColorCharacters = true
<syntaxhighlight lang="lua" line>
</SyntaxHighlight>
local Teams = game:GetService("Teams")
Teams.Team.AutoColorCharacters = true
</syntaxhighlight>
}}
}}


[[Category:Properties]]
[[Category:Properties]]

Latest revision as of 21:41, 9 June 2024

AutoColorCharacters
Type bool
Description A value that sets whether players on the team wear the team colors automatically. This property has no effect because the Animate script (which colors the characters) does not check it.
Member of Team


Example

This should leave the character colors unchanged:

local Teams = game:GetService("Teams")
Teams.Team.AutoColorCharacters = false

This should cause the character limbs to change to Black, their Heads to change to Bright yellow, and their Torsos to change to their TeamColor:

local Teams = game:GetService("Teams")
Teams.Team.AutoColorCharacters = true