R6 animation does not play as well as it plays well

Hi! I have been having this problem for about 3 days when I was trying to make test animations for weapons and to be able to animate them with the Torso of the player together with Motor6D but at the beginning, since I started to make the animations and played them, they did not play as they should be. Here is a video of a recent animation I made and tested.


This script plays the animation

local Player: Player? = game.Players.LocalPlayer
local Character: Model? = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Tool: tool? = script.Parent
local AnimationTrack: AnimationTrack?
local Event
local Animation: Animation? = script:WaitForChild("Animation")
local Coldown = 1

Tool.Equipped:Connect(function(Mouse)
    Event = Mouse.Button1Up:Connect(function()
        AnimationTrack = Humanoid.Animator:LoadAnimation(Animation)
        AnimationTrack.Priority = Enum.AnimationPriority.Action
        AnimationTrack:Play()
        task.wait(Coldown)
        AnimationTrack:Stop()
    end)
end)

Tool.Unequipped:Connect(function()
    Event:Disconnect()
end)

Does anyone know why it does not reproduce as it should?

You seem to be missing a few things, like remaking the motor6d in a server script. I don’t know if you have a server script it seems like you didn’t show it, if so can I see it?

Here is a tutorial I used:

This is inside the tool

image

And the scirpt really looks like this

RemoteEvent1 and RemoteEvent2

Script in the StarterCharacterScripts

image

Can you show me what the animation looks like in-game or is it broke.

Just put this in your server script in the tool, it doesn’t to be in the startercharacterscript

Okay, I’m doing it. First I’m going to record over the animation again.

Instead of doing it on the torso try the right arm

This happened