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?