What do you want to achieve? Keep it simple and clear!
I want the walking animation of my character to stop when the jumpscare animation plays.
What is the issue? Include screenshots / videos if possible!
The walking animation keeps playing even though I scripted it to stop. The walking animation kinda plays as the jumpscare animation plays
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried messing around with the animation priorities. No other problems seems to match mine
Script:
while true do
wait(1)
script.Parent:WaitForChild(“Humanoid”):LoadAnimation(script:WaitForChild(“Animation2”)):Play()
wait(5)
script.Parent:WaitForChild(“Humanoid”):LoadAnimation(script:WaitForChild(“Animation2”)):Stop()
script.Parent:WaitForChild(“Humanoid”):LoadAnimation(script:WaitForChild(“Animation3”)):Play()
end
Remember, you are using a loop, no matter what, it will repeat unless stopped
Here is a possible fix:
local Hum = script.Parent:FindFirstChild("Humanoid")
local A2 = Hum:LoadAnimation(script.Animation2)
local A3 = Hum:LoadAnimation(script.Animation3)
While true do
wait(1)
A2:Play()
Wait(5)
A2:Stop()
A3:Play()
The animation is inside a while true script. After Animation3 Plays, it immediately goes back to wait(1) and then replays Animation2.
EDIT: Just reread what you mean, you should use Humanoid.Animator to load animations. After that, you can use Animator:GetPlayingAnimationTracks() to get a table containing all playing animations and just stop them.
Ich bin nicht gut deutsch spricht. (Translation : I am not very good at speaking german. Maybe it don’t would say anything. lol I’m bad at speaking english AND german. French is easier. ^^)