I've already searched around but Google keeps giving me completely unwanted topics that just happen to include the words that I'm using to describe my issue. I can't seem to find any other questions on ScriptingHelpers addressing this particular issue either.
Let's say I'm creating a pistol. A very simplistic pistol. I create an instance of a tool and I put a part with the name "Handle" in the tool.
By default, the character's right arm will be raised when the tool is equipped. I think it looks a little unnatural, and I want to adjust my character's arms so that both of the arms are held out in front of the character, so that my character is holding the pistol correctly.
I create an animation using the animation editor plugin with the R15 rig, and I publish it to the website. I inserted a LocalScript into the tool as well as an instance of an Animation. I put in the corresponding ID for the AnimationId property, and this is what I put into the LocalScript:
local anim = script.Parent:WaitForChild("Animation")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local anim_2 = humanoid:LoadAnimation(anim)
local tool = script.Parent
tool.Equipped:Connect(function()
anim_2:Play()
end)
tool.Unequipped:Connect(function()
anim_2:Stop()
end)
I threw this together in about a minute, so the variable placement may seem a little bit unconventional.
Anyways, it plays the animation whenever the player equips the tool. The thing is, the default R15 animations created by Roblox are immediately overriding the animation. The animation plays for a split second and is promptly overriden by the idling animations created by Roblox.
https://gyazo.com/aa5c73c0604ac57af7f964e8080d5c69
Just to be sure, I tweaked the length of the animation multiple times, ranging from 1 second to 5 seconds. The difference was nothing short of negligible.
How do I prevent default animations, created by Roblox, from overriding custom animations?

10 comments
Maybe try deleting the player's animation with :Destroy()
I kind of want to blend the animations, and Roblox seems to be allowing that, but for some reason the animation immediately stops playing.
So for example if they are walking and they use the tool, they get the animation while still walking with the player owned animation. Do you mean that?
That already happens. My issue is that the animation plays for a split second and then immediately stops. I guess I could delete the walking/idling animations but that's not what I want.
First of all, check in the animation editor if the gaps are enough to see the difference
Huh?
I initially created the animation with a length of 1 second, and when it immediately stopped playing, I changed its length to 5 seconds to check to see if the length of the animation was the issue. Even if it was, increasing it didn't work either.
View your animation in the animation editor to see if every frame has time to change (and be view-able properly).
Oh.
Try adding some waits in your code maybe like wait(1).