You need to tick some boxes to figure out the adjustments you need to make.
IMPORTANT ADDITION: If you published the animation from a keyframe sequence, that’s completely fine, but if you published it from an animation, it will never work, since the keyframe sequence actually has the animation, animation on the other hand is just an instance that holds the ID of the keyframe sequence so it can be used in scripts.
Question 1: Is the animation published by you or a group?
Option 1, you:
You can only use this animation on your place, not one owned by a group.
Option 2, a group:
You can only use it in games owned by that group in particular, but not games that don’t fall under the ownership of that group.
Question 2: Is the animation R6 or R15?
Option 1: R6
If the animation is for R6 characters, it can only be used by R6 characters, not R15 ones.
Option 2: R15
If the animation is for R15 characters, it can only be used by R15 characters, not R6 ones.
Question 3: Did you load the animation with the HumanoidRootPart or the Animator inside the HumanoidRootPart
Option 1: HumanoidRootPart
You can not load an animation like this anymore:
local HumanoidRootPart = script.Parent
local Animation = script.Parent.Parent:WaitForChild("SwordAnim")
HumanoidRootPart:LoadAnimation("Animation")
Back in the day, this was completely correct, but now it, HumanoidRootPart cannot load animations, since it is deprecated.
Option 2: Animator:
This option is the only correct option. If you do not know how to set it up, here’s an example:
local HumanoidRootPart = script.Parent
local Animation = script.Parent.Parent:WaitForChild("SwordAnim")
local Animator = HumanoidRootPart:FindFirstChildOfClass("Animator")
if not Animator then
Animator = Instance.new("Animator")
Animator.Parent = HumanoidRootPart
end
local AnimTrack = Animator:LoadAnimation(Animation)
AnimTrack:Play()
Hope my reply solved your issue, if so, I would greatly appreciate marking it as the solution.