Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to delete default sword animation from humanoid?

Asked by 6 years ago

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

Log in to vote
1
Answered by
DanzLua 2879 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

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

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. flufffybuns 89 — 6y
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. DanzLua 2879 — 6y
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 DanzLua 2879 — 6y
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 flufffybuns 89 — 6y
View all comments (7 more)
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 flufffybuns 89 — 6y
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? DanzLua 2879 — 6y
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 flufffybuns 89 — 6y
0
Holy crap, I forgot about the priority feature, THANK YOU!! flufffybuns 89 — 6y
0
@fluffybuns ah :P DanzLua 2879 — 6y
0
haha, im stupid. I should of remembered of the feature. thanks flufffybuns 89 — 6y
0
@fluffybuns np, nice animation too :P DanzLua 2879 — 6y
Ad

Answer this question