Help with Motor6D for animation

I have an animation for a bat idle. Here is what it looks like:

image

There is a Motor6D in the Dummy’s Right Arm. Properties:

image

Now, when the player equips the animation, I want it to look just like that. I’ve written a script, inserted the motor, yet it looks like this?

image

Local Script:

local weapon = script.Parent
local handle = weapon:WaitForChild("Handle")
local animation = script:WaitForChild("Animation")
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local anim = humanoid:LoadAnimation(animation)
local motor = Instance.new("Motor6D")
motor.Name = "Bat"
motor.Part0 = character:WaitForChild("Right Arm")
motor.Part1 = handle
motor.CurrentAngle = 1.313
motor.Enabled = true

motor.Parent = character:WaitForChild("Right Arm")

weapon.Equipped:Connect(function()
	anim:Play()
end)

weapon.Unequipped:Connect(function()
	anim:Stop()
end)

The tool:
image

No errors. I would appreciate some help!

I assume you were using a plugin to create a motor6D for the bat to do the animation. if you did then you will have to recreate the motor6D for the animation when you will create it just do instance.new("Motor6D", workspace) in the command bar then put it in your Dummy and set its part1 and part0 you will notice the position will change then you can start re-animating it