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

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

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?

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:

No errors. I would appreciate some help!