I’ve made a discovery that whenever the color is change within the BodyColors the color that you selected will be the cloest to the already existing color in a BrickColor form.
-- Color I selected = Color the script automatically selected
Color3.fromRGB(125, 125, 125) = Color3.fromRGB(120, 144, 130) -- Sand Green
Color3.fromRGB(255, 255, 100) = Color3.fromRGB(255, 246, 123) -- Tr. Flu. Yellow
Color3.fromRGB(0, 0, 80) = Color3.fromRGB(0, 32, 96) -- Navy Blue
I suspected that, but pushed it aside as I didn’t find anything on the devhub. This is kinda dumb, and now my BodyColors widget doesn’t work like I want it to
Sorry for late response.
For now if you’re planning to change player’s body color then I suggest you make a table and gather all of the parts associated with the limb in R6 here is an example on what I’d do in the OnServerEvent script
local ColorInformation = {
LeftArmColor3 = {"LeftLowerArm", "LeftUpperArm", "LeftHand"};
LeftLegColor3 = {"LeftLowerLeg", "LeftUpperLeg", "LeftFoot"};
RightArmColor3 = {"RightLowerArm", "RightUpperArm", "RightHand"};
RightLegColor3 = {"RightLowerLeg", "RightUpperLeg", "RightFoot"};
TorsoColor3 = {"UpperTorso", "LowerTorso"};
HeadColor3 = {"Head"};
}
game:GetService("ReplicatedStorage").RemoteEvent.OnServerEvent:Connect(function(p, r, g, b, a)
for _,Part in pairs(p.Character:GetChildren()) do
if table.find(ColorInformation[a], Part.Name) then
Part.Color = Color3.fromRGB(r, g, b)
end
end
end)
Forgot to mention that the only thing you need to do is change the “a” and make it matches the variable within the table. An example is that if I want to change the color of torso to whatever I want and the input a is TorsoTorso
print(a) -->TorsoTorso
then all you need to do is change the variable within the table to TorsoTorso
game:GetService("ReplicatedStorage").RemoteEvent.OnServerEvent:Connect(function(p, r, g, b, a)
for _,Part in pairs(p.Character:GetChildren()) do
if table.find(ColorInformation[a], Part.Name) then
Part.Color = Color3.fromRGB(r, g, b)
end
end
end)
Nono the code that I wrote change the parts manually without having to rely on the Body Colors
The result should be the exact same as the information sent from the client. Accurate.