Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to delete default sword animation from humanoid?

Okay, I have an animation playing in character but the only thing breaking my custom animation is the default sword animation. And I don't want to change the sword animation, I want to delete it. How do I do this in a script? Here is my script just in case:

local player = game.Players.LocalPlayer
local char = player.Character
local animation = script.fight

animation:Clone().Parent = char.Humanoid

wait(1)

local animTrack = char.Humanoid:LoadAnimation(animation)
animTrack:Play()

The case is that the default sword animation interferes with the custom animation I made, so it doesn't work correctly.

1 answer

✓ Accepted answer

The part of the script that plays the animation is

local animTrack = char.Humanoid:LoadAnimation(animation)
animTrack:Play()

Here's the script without it

local player = game.Players.LocalPlayer
local char = player.Character

animation:Clone().Parent = char.Humanoid

You may want to also delete the animation instance at script.fight

11 comments

0

That script is my script, which plays the custom animation I made. Sorry, should of specified. What I want to do is delete the DEFAULT sword animation, but since it still plays while the sword is equipped, my custom animation interferes with the default sword animation, which I don't want. I want the default sword animation deleted.

0

@fluffybuns Oooo that's ok, what you'll want to do is delete the animation instance inside the sword, doing this will stop the animation from playing but will most likely cause an error, if so you can use the error to locate where inside the other script it is playing the animation, then removing that part just as i removed it from the script shown.

0

@fluffybuns If there is no animation instance then the script is probably creating one so you'll have to locate it inside that script. gl ;D

0

There is no animation instance in the sword. Okay, let me rephrase this because I think I did a really bad job explaining. When holding a sword or any weapon, a default weapon holding animation plays, right? Then, an animation should play in the whole character (not the sword). The problem is that since both the default sword holding animation and my custom animation is playing at the same tim

0

Was that cut off? Sorry, what I meant to say is that since both my custom animation and the default sword holding animation is playing at the same time, it doesn't work correctly. Also, here is a gif of what the animation is supposed to look like: https://gyazo.com/d58cddee3a86485b449a08adef50eda4 And, this is what happens when the animation is applied to character and interferes with the def

0

@fluffybuns Do you mean when you equip a tool the right arm moves up? Also have you tried to change the priority of your animation to Action to insure its set on the top layer?

0

Ahha, got cut off again. The last part was a gif of what happens if the default sword holding animation and my custom animation interferes. Here it is https://gyazo.com/a5a796930529d68016782a65e1a895ab

0

Holy crap, I forgot about the priority feature, THANK YOU!!

0

@fluffybuns ah :P

0

haha, im stupid. I should of remembered of the feature. thanks

0

@fluffybuns np, nice animation too :P

This discussion is preserved as it was. New answers, comments, and votes are closed.