ok so this is my script and for some reason when I try to change the hand color (from the custom outfit) it wont change it
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local newPlayerOutfit = game.ReplicatedStorage:WaitForChild(“PlayerOutift”):Clone()
newPlayerOutfit.Parent = character
for i, v in pairs(newPlayerOutfit:GetChildren()) do
for i, x in pairs(character:GetChildren()) do
if v.Name == x.Name.."1" then
local weld = Instance.new("WeldConstraint")
weld.Parent = character
newPlayerOutfit.Lhand.BrickColor = character["Right Arm"].BrickColor
newPlayerOutfit.Rhand.BrickColor = character["Left Arm"].BrickColor
v.CFrame = x.CFrame
v.CFrame *= CFrame.Angles(
math.rad(0),
math.rad(180),
math.rad(0)
)
weld.Part0 = x
weld.Part1 = v
x.Transparency = 1
end
end
end
Not sure if this will help you or not as I don’t work with r6 bodies.
This is a snippet from a few of my scripts for a r15 body.
local rgb=(Color3.fromRGB(51, 52, 59))
local co=character:FindFirstChild("Body Colors")
if co.TorsoColor3==co.LeftLegColor3 then
co.TorsoColor3=rgb
co.LeftArmColor3=rgb
co.RightArmColor3=rgb
end task.wait(1.5)
Notice I’m working directly with the Body Colors and not the part itself.
This is part of two touched script that toggles “black-ish gloves” with their normal hand color.
(I’m just changing the hand color and I want the neck color to match that)
Snippet from the other touched script.
local rgb=(Color3.fromRGB(51, 52, 59))
local co=character:FindFirstChild("Body Colors")
if co.TorsoColor3==rgb then
co.TorsoColor3=co.LeftLegColor3
co.LeftArmColor3=co.LeftLegColor3
co.RightArmColor3=co.LeftLegColor3
end task.wait(1.5)
In these you can’t see the Left Leg (it’s covered by the outfit) so, I’m using it as color reference of their original body color.
I tried to do this
newPlayerOutfit.Lhand.Color = co.LeftArmColor3
but for some reason I dont know why it brings me this error
ServerScriptService.PlaceUniform:12: attempt to index nil with ‘LeftArmColor3’
even tho there is LeftArmColor3