Hey there, so I am making a PVP game with classes that have cosmetic armor pieces, and I have a script to place and weld them onto the players body, and works for 2 of the classes that I have which have only 1 or 3 pieces. But for some reason on my full armor set the rotation isnt right, and I can’t figure out why and not sure what to do to try and solve it.
Script:
if humanoid then
local RArm = Character:FindFirstChild("Right Arm")
local LArm = Character:FindFirstChild("Left Arm")
local RLeg = Character:FindFirstChild("Right Leg")
local LLeg = Character:FindFirstChild("Left Leg")
local Torso = Character:FindFirstChild("Torso")
local Head = Character:FindFirstChild("Head")
local Armor = ArmorModel:GetChildren()
for i, x in pairs(Armor) do
print("Cloning Armor")
if x:IsA("Model") then
local v = x:Clone()
local Middle = v.Middle
if v.Name == "Chest" then
v.Parent = Torso
v:SetPrimaryPartCFrame(Torso.CFrame)
weld(Middle, Torso, nil, nil)
elseif v.Name == "LArm" then
v.Parent = LArm
v:SetPrimaryPartCFrame(LArm.CFrame)
weld(Middle, LArm, nil, nil)
elseif v.Name == "RArm" then
v.Parent = RArm
v:SetPrimaryPartCFrame(RArm.CFrame)
weld(Middle, RArm, nil, nil)
elseif v.Name == "Helm" then
v.Parent = Head
v:SetPrimaryPartCFrame(Head.CFrame)
weld(Middle, Head, nil, nil)
elseif v.Name == "RLeg" then
v.Parent = RLeg
v:SetPrimaryPartCFrame(RLeg.CFrame)
weld(Middle, RLeg, nil, nil)
elseif v.Name == "LLeg" then
v.Parent = LLeg
v:SetPrimaryPartCFrame(LLeg.CFrame)
weld(Middle, LLeg, nil, nil)
end
end
end
Like I said before, the other more simple class armors worked fine and were rotated correctly, but when I try to do the bigger armor set, this happens and everything is -90 Y off on rotation:
I have already attempted to rotate them different ways in 3D space before moving them to my server storage folders, but that didn’t do anything. If anyone knows whats happening or has any ideas please let me know! thanks.