How do i get a player's character color

So im trying to get a player’s color but im not sure how to get the player’s color, I want to change the color back to their original color after the cooldown. How would i do this?

local enabled = true

script.Parent.Dash.OnServerEvent:Connect(function(player)
	
	if not enabled then return end
	
	enabled = false
	
	local char = player.Character
	local originalwalkspeed = 16
	local children = char:GetChildren()

	char.Humanoid.WalkSpeed = 30
	
	for i,v in pairs(children) do
		if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
			v.Transparency = 0.8
			v.BrickColor = BrickColor.new("Royal purple")
		end
	end	
	
	wait(5)
	
	char.Humanoid.WalkSpeed = originalwalkspeed
	
	for i,v in pairs(children) do
		if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
			v.Transparency = 0
		end
	end	
	
	wait(5)
	
	enabled = true
	
end)

I believe there is a BodyColors object inside a player’s character that handles giving colors to each limb, I think you can use that?

1 Like

but how would i get all of that and use it?

You can get the players skin color from the players character in Humanoid.HumanoidDescription.HeadColor

HeadColor?

You have the character, so you can get the BodyColors object and possibly clone it, then you can destroy the original copy change the colors of the limbs and once you are done with the dash, revert the colors by putting the clone into the character again

how can i get the bodycolors object though, what is that?

It’s a thing added to your character that determines your colors

image

Retrieve it using char["Body Colors"] in your case, clone it but don’t parent it to anywhere yet, destroy the original version, change the colors to what you have, and when you want it the original colors back, put the clone into the character again and it should work

2 Likes

Yay, it works now thanks!

1 Like

Anytime! If you have anymore issues don’t be afraid to make another post!

2 Likes