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

Why does the Idle animation play over my Animation even though it's priority is Action?

Asked by 5 years ago
Edited 5 years ago

I am in need of help with this

so i'm trying to make a taser thing that stuns people, so i created an animation for when you get stunned hit by the taser, the only problem is that when the command is given to play the animation, it only plays it for a second and then goes back to the idle animation. I have set the animation's priority to "Action" so it should be playing over everything else, here is the code for if i'm doing something wrong.

local Anim = Instance.new("Animation")

Anim.Name = "Taser"

Anim.AnimationId = "http://www.roblox.com/asset/?id=2939741656"

local LoadNewAnimation = Humanoid:LoadAnimation(Anim)

LoadNewAnimation.Priority = Enum.AnimationPriority.Action

LoadNewAnimation:Play()

sorry it's not formatted like normal code but i'm trying to paste it and only one line comes out as code so :/, excuse my noobiness

1 answer

Log in to vote
1
Answered by
AizakkuZ 226 Moderation Voter
5 years ago
Edited 5 years ago

You don't have to do any of that just make it so its plays when u hit the npc u don't have to make a script that changes the Priority just a script that plays the animation and in the animation editor simply make it that priority already. ```lua

local Anim = Instance.new(“Animation”) Anim.Name = “Taser” Anim.AnimationId = “http://www.roblox.com/asset/?id=2939741656”

local LoadNewAnimation = Humanoid:LoadAnimation(Anim) LoadNewAnimation:Play() ```

0
Wth StackEdit omgg AizakkuZ 226 — 5y
0
And of course StackEdit doesn't remember me even editing so i can't change npc to player AizakkuZ 226 — 5y
Ad

Answer this question