A friend scripted this script for me but I'm having trouble with it.

repeat wait() until game.Players.LocalPlayer
and game.Players.LocalPlayer.Character and
game.Players.LocalPlayer.Character:findFirstChild"Body Colors"
local char = game.Players.LocalPlayer.Character
local color = {1,5,9,11,18,
21,23,24,26,28,29,37,
38,45,101,102,104,105,
106,107,119,125,135,141,
151,153,192,194,199,208,
217,226,1001,1002,1003,1004,1005,
1006,1007,1008,1009,1010,1011,1012,	
1013,1014,1015,1016,1017,1018,1019,
1020,1021,1022,1023,1024,
1025,1026,1027,1028,1029,1030,1031,1032}
script.Parent.CloseButton.MouseButton1Down:connect(function() while script.Parent:findFirstChild("ColorFrame") do script.Parent.ColorFrame:Destroy() end script.Parent.Visible=false end)

script.Parent.Parent.TextButton.MouseButton1Down:connect(function() script.Parent.Visible=true end)

function colorframe(button)
	local fr = Instance.new("Frame", script.Parent)
	fr.Size = UDim2.new(0, 90, 0, 90)
	fr.Style="RobloxSquare"
	fr.ZIndex=2
	while script.Parent:FindFirstChild("ColorFrame") do
		script.Parent.ColorFrame:Destroy()
	end
	fr.Name = "ColorFrame"
	fr.Position=button.Position+UDim2.new(0,-75,0,-105)
	fr.MouseEnter:connect(function() fr.MouseLeave:connect(function() fr:Destroy() end) end)
	for i = 1, 8 do
		for k = 1, 8 do
			local colorb = Instance.new("ImageButton", fr)
			colorb.Image = ""
			colorb.ZIndex=2
			colorb.Size=UDim2.new(0,10,0,10)
			colorb.BorderSizePixel=1
			colorb.Position=UDim2.new(0,-15+i*10, 0, -15+k*10)
			colorb.BackgroundColor=BrickColor.new(color[(i-1)*8+k])
			local dbb=false
			colorb.MouseButton1Down:connect(function()
				if dbb then return end
				dbb=true
				button.BackgroundColor=colorb.BackgroundColor
				pcall(function() local bc=char["Body Colors"]
					bc.Parent = workspace
					bc[button.Name]=colorb.BackgroundColor
					bc.Parent = char
				end)
				wait(.1) dbb = false
			end)
		end
	end
end


for i, v in pairs(script.Parent:GetChildren()) do
	if v:IsA"ImageButton" then
		v.BackgroundColor = char["Body Colors"][v.Name]
		local db = false
		v.MouseButton1Down:connect(function() 
			if db then return end
			db=true
			colorframe(v)
			wait(.1)
			db=false
		end)
	end
end

That's my code up there. I've been trying to figure out how to make it target a player's bodyparts instead of using the Body Colors child. My player is custom however, and the parts I've welded to the player model are called fakeTorso, rArm, lArm, rLeg and lLeg.

wat do?

3 comments

0

Talk to your friend about His code.

0

great help dude! you should become a professional scripter.

0

/sarcasm