Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Changing player color?

I want to know the procedures of changing a player's colors or adding a decal onto them to make clothes. NOTE: I don't want a script (although I still would take it) because that is not what I am asking for.

1 answer

There are a couple of ways to change the player's colours. One way, is the change the colours that are in the Player's BodyColors object. This will change the colour of the designated bodypart and make sure they stay changed.

local bodycolors = game.Players.Player.Character.BodyColors

repeat wait() until bodycolors
BodyColors.HeadColor = BrickColor.new('Bright blue')
BodyColors.HeadColor = BrickColor.new('Bright green')

Another way to do this is to use a loop to get all of the parts in the character, and change their colour directly.

local character = game.Players.Player.Character

repeat wait() until character
for _, bodypart in ipairs (character:GetChildren()) do
	if bodypart.Name == 'Head' then
		bodypart.BrickColor = BrickColor.new('White')
	elseif bodypart.Name == 'Torso' then
		bodypart.BrickColor = BrickColor.new('Bright red')
	end
end

For adding a decal, you would use the method Instance.new to create the decal object and from there set it's Image and face properties.

local character = game.Players.Player.Character

repeat wait() until character
local decal = Instance.new('Decal', character)
decal.Image = 'http://roblox.com/asset/?id=1337'

Hope this helped :)

This discussion is preserved as it was. New answers, comments, and votes are closed.