So, I currently have my armor equipping system based on setting its primary part cframe (the chestplate (a humanoidrootpart basically), and when the player is moving around a lot or is in a small space, the armor gets pasted correctly, but since animations are playing when the armor welds, it makes it all funky when they go to an idle state.
Script?
spawn(function()
for i, v in pairs(v.SelectedArmor:GetChildren()) do
character.Animate.Disabled = true
for i, v in pairs(character.Humanoid:GetPlayingAnimationTracks()) do v:Stop() end
task.wait(0.5)
local armor = v:Clone()
local model = Instance.new("Model",workspace)
armor.Parent = model
model.PrimaryPart = armor.Chestplate
model:SetPrimaryPartCFrame(character.HumanoidRootPart.CFrame)
armor.Parent = character
model:Destroy()
for i, v in pairs(armor:GetChildren()) do
if v:FindFirstChild("BodyPart") then
if character:FindFirstChild(v.BodyPart.Value) then
local weld = Instance.new("WeldConstraint",v)
weld.Part0 = v
weld.Part1 = character[v.BodyPart.Value]
end
else
if v.Name == "Protection" then
v.Parent = character
else
v:Destroy()
end
end
end
character.Animate.Disabled = false
end
end)
Note that I’ve been trying to disable their animations and stuff and so far it kind of works