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

How can I have animation 1 interrupt animation 2?

Asked by
mcox6 5
3 years ago

I have two animations. I have a gun hold animation, and a gun shoot animation. I'm trying to have the gun hold animation play, and then when the shoot animation is called, it plays over the hold animation.

I searched for solutions but honestly it's a tricky question to find the words for.

01local Players = game:GetService("Players")
02local gunequipped = false
03local WeaponTool = script.Parent.Pistol
04local player = Players.LocalPlayer
05 
06local character = player.Character
07if not character or not character.Parent then
08    character = player.CharacterAdded:Wait()
09end
10 
11local char = character
12print(char.Name)
13print(character.Name)
14local humanoid = character:WaitForChild("Humanoid")
15local animator = humanoid:WaitForChild("Animator")
View all 89 lines...

Any insight would help! Thanks if you've read this far!

0
You will need to use the animation priority. Try setting it to something higher like 'Action'. Soban06 410 — 3y

2 answers

Log in to vote
2
Answered by 3 years ago

Set the shooting animation's priority to be higher etc movement

0
Exactly. Animations have a 'tier' system. If animation A has a higher animation priority than animation B, animation A will play over top of animation B. appxritixn 2235 — 3y
0
I've been trying to use animation priority to fix this, however it seems to have no result (I changed the hold animation to idle and the shoot animation to action) mcox6 5 — 3y
Ad
Log in to vote
0
Answered by
mcox6 5
3 years ago

I made a pretty stupid mistake. The locals for the animations were mixed up. It's as simple as that. Remember to always check your code 100 times!

Answer this question