BodyColor (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer
I'm going to start adding in examples to these functions.
 
>Camoy
reconstruct
 
(19 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Property|
{{CatUp|Properties}}
name = <bodypart>Color
|property = [[BrickColor]] ''Body part color''
|description = Set the color of the body part, such as HeadColor.
|object = [[BodyColors]]
|}}


==Example==
<onlyinclude>{{Property
<pre>
|name = BodyColor
colors = game.Players.LocalPlayer.Character.BodyColors
|property = [[BrickColor]] ''body part color''
if (colors ~= nil) then
|description = Set the color of the body part. There is ''HeadColor'', ''LeftArmColor'', ''LeftLegColor'', ''RightArmColor'', ''RightLegColor'', and ''TorsoColor''.
    colors.HeadColor = BrickColor.new(1)
|object = BodyColors
    colors.LeftArmColor = BrickColor.new(1)
}}</onlyinclude>
    colors.RightArmColor = BrickColor.new(1)
end


</pre>
{{clear floats}}
 
{{Example|Within a LocalScript.<pre>
local colors = game.Players.LocalPlayer.Character.BodyColors
if colors then
colors.HeadColor = BrickColor.new(1)
colors.LeftArmColor = BrickColor.new(1)
colors.RightArmColor = BrickColor.new(1)
end
</pre>}}
 
[[Category:Properties]]

Latest revision as of 17:29, 27 December 2010

BodyColor
Property BrickColor body part color
Description Set the color of the body part. There is HeadColor, LeftArmColor, LeftLegColor, RightArmColor, RightLegColor, and TorsoColor.
Member of BodyColors


Example
Within a LocalScript.
 
local colors = game.Players.LocalPlayer.Character.BodyColors
if colors then
colors.HeadColor = BrickColor.new(1)
colors.LeftArmColor = BrickColor.new(1)
colors.RightArmColor = BrickColor.new(1)
end