I’ve been working on a punch-barrage effect for a project and it works rather well. However, there is an annoying issue: sometimes the humanoid for the arm’s visuals fails to load, resulting in the visuals just looking like blocks instead of the player’s arms. A video can be seen here:
Is there any way to prevent this without decreasing the rate the barrage effects are created?
I know that the issue still persists whether I completely instantiate a new arm or just clone the character model and remove parts that do not alter how the arms look.
Here is the code currently in use to create an arm copy. (char variable is the character model, arm is the arm that needs to be copied)
local model = char:Clone()
model.Name = "Arm"
for i, v in pairs(model:GetChildren()) do
if (v.Name ~= arm.Name) and not (v:IsA("Shirt") or v:IsA("Humanoid") or v:IsA("CharacterMesh")) then
v:Destroy()
end
end
local newArm = model[arm.Name]
newArm.Anchored = true
model.Parent = workspace