Changing Player Body Colors

Hello, I just wanted to ask how I could change the body color of a character through cloning from replicated storage. I have been trying to clone it before, however it still ends up reverting back to the player’s original colors.

The script that I have been using is below:

if char:FindFirstChildWhichIsA("BodyColors") then
			char["Body Colors"]:Destroy() --is destroying the body colors
		end
		
		if plr.Team == BCastle then
			newBodyColor = TeamInfo.BCastle["Body Colors"]:Clone()
			newBodyColor.Parent = char
			print(char["Body Colors"].TorsoColor)
		elseif plr.Team == RFort then
			newBodyColor = TeamInfo.RFort["Body Colors"]:Clone()
			newBodyColor.Parent = char
			print(char["Body Colors"].TorsoColor)
		else
			newBodyColor = TeamInfo.Spectator["Body Colors"]:Clone()
			newBodyColor.Parent = char
			print(char["Body Colors"].TorsoColor)
		end

In the end, it still ends up reverting back or changing the colors to the player’s current colors.

If you have any feedback on how I could fix this issue that would be greatly appreciated, thank you!

2 Likes

Hello, are you doing other operations to character before or after you change its body colors ?

Found the problem, loading character resets body colors. Thank you for bringing that flaw to my attention!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.