[FIXED] Really messy broken script please help im dumb

Hi there, I just made this mess of a script and of course, it doesn’t work. If anyone could help me clean it up or just help me fix the bug it would be appreciated. At the moment I have one of the skin colors equipped in the table so it should be printing “natural skin”.
Note: I’m very new to scripting and tables so sorry if this makes you cringe.

Script

local allowed = {
	"234,184,146",
	"204,142,105",
	"175,148,131",
	"124,92,70",
	"90,76,66",
	"86,66,54",
	"105,64,40"
}



	
	game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(Character)
		local character = player.Character
		for x, c in pairs (allowed) do
			if not c == character:WaitForChild("BodyColors").HeadColor3 or
				character.BodyColors.RightArmColor3 or
				character.BodyColors.RightLegColor3 or
				character.BodyColors.LeftArmColor3 or
				character.BodyColors.RightArmColor3 or
				character.BodyColors.RightLegColor3 or
				character.BodyColors.TorsoColor3  
			then
				character.BodyColors.HeadColor3 = "234,184,146"
				character.BodyColors.RightArmColor3 = "234,184,146"
				character.BodyColors.RightLegColor3 = "234,184,146"
				character.BodyColors.LeftArmColor3 = "234,184,146"
				character.BodyColors.RightArmColor3 = "234,184,146"
				character.BodyColors.RightLegColor3 = "234,184,146"
				character.BodyColors.TorsoColor3 = "234,184,146"
			else
				print("natural skin")
			end
		end	
	end)
end)

Output:
image

Change the :WaitForChild(“BodyColors”) to :WaitForChild(“Body Colors”)

Character’s body colors are named “Body Colors” not “BodyColors”, thats why it wont work

2 Likes

Add a space, it has 2 words you know.

2 Likes

what this guy said, BodyColors have a space

1 Like

I just changed it and now the output has changed to: image

Realised it, I need to space the mess.

ok lemme help, you still have the character.BodyColors

Change that to character[“Body Colors”]

1 Like

Yep works now, thanks for the help!