Hello, I’ve made an equip animation but the model flickers. This is my code:
local clone = weapon.Handle:FindFirstChildOfClass("Model"):Clone()
clone.Parent = player.Character
local motor = Instance.new("Motor6D")
motor.Parent = player.Character.Torso
motor.Part0 = player.Character.Torso
motor.Part1 = clone.Cube
kickAnimationTrack:Play()
weapon:Destroy()
wait(1.4)
clone:Destroy()
weapon = game:GetService("ServerScriptService").Script.Bow:Clone()
weapon.Handle:FindFirstChildOfClass("Attachment").Name = "LeftGripAttachment"
weapon.Handle:FindFirstChildOfClass("Attachment").CFrame = CFrame.new(.5,0,.25) *
CFrame.fromEulerAngles(math.rad(-90), math.rad(-180), 0)
weapon.Parent = player.Character
idleAnimationTrack:Play()`
So I first have the weapon attached to the character’s back via an accessory, and then when the player presses a button, the script clones the model inside the accessory and welds the model to the character via Motor6d. Then the accessory is destroyed and the equip animation plays out. When the animation is done, the accessory is cloned again and is equipped to the character and the model used for the animation is destroyed. I’ve tried delaying before the initial accessory is destroyed so that the animation model has time to establish itself but it still flickers.