Color changing problem

trying to change character color with remote event but it keeps turning black.

client

for _, btn in pairs(colors:GetChildren()) do
	if btn:IsA("GuiButton") then
		
		btn.MouseButton1Down:Connect(function()
			local clr = btn:GetAttribute("Color") -- color3
			
			remote.ChangeColor:FireServer(clr)
		end)
		
	end
end

server

remote.ChangeColor.OnServerEvent:Connect(function(player, color)
	local char = player.Character or player.CharacterAdded:Wait()
	
	for _, limb in pairs(char:GetChildren()) do
		if limb:IsA("BasePart") and limb.Name ~= "HumanoidRootPart" then
			limb.Color = Color3.fromRGB(color)
		end
	end
end)
1 Like

The parameters of Color3.fromRGB are three numbers ranging from 0 to 255, not a single Color3. You’re already passing in a Color3 to your event, so you can just get rid of the fromRGB bit and have just limb.Color = color.