Hi Everyone!
So i am making Arsenal type of game and i dont want to make my own guns and using now roblox’s made weapons but when i the time is out the aim animation keeps playing i want to know how can stop that
Hi Everyone!
So i am making Arsenal type of game and i dont want to make my own guns and using now roblox’s made weapons but when i the time is out the aim animation keeps playing i want to know how can stop that
You can use the Humanoid:GetPlayingAnimationTracks()
to get a list of which animations a humanoid is running. Heres an example
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character.Humanoid
for i,v in pairs(Humanoid:GetPlayingAnimationTracks()) do
print("Found an animation!", v)
end
That should print all the animation objects the humanoid is playing
Animator.GetPlayingHumanoidTracks
is not tho.
That’s because Animator is the new object which is replacing it iirc. Theres no document on the wiki yet but I assume one will be there soon.
It actually prints Found an animation! Animation but how can i stop playing it because when i do v:Stop() it doesnt anything
Possibly check if v.IsPlaying == true
, since then it won’t stop it if it’s not running. What have you tried to do to stop it?
I believe that after the deprecation of Humanoid:LoadAnimation
and AnimationController
, I strongly recommend using Animator
instance for handling animations and running them, although that it is not documented yet but :GetPlayingAnimationTracks
is one of the animator’s methods.
Animator:GetPlayingAnimationTracks
Animator
Deprecating LoadAnimation on Humanoid and AnimationController - Updates / Announcements
i tried to do v:Stop() but it didnt work i am not specialised in animating so i dont know much about them like if it plays how can i stop it etc
Thanks
if its not hard for you can you tell me how can i stop animations with that
what i would do, create a module that contains all the playing animation for that player.
try messing with the guns script, whenever an animation will play, add that animation to the module.
Then the other scripts will stop all animation put on that module. However this is not really reliable
If you’re expecting code then stop waiting, I’m not going to spoonfeed you you’re simply using a deprecated method and I’m showing you how to replace it with a valid one, and I also have linked you 3 threads talking in specific about this.
I saw all your linked things but it doesnt solve my problem i am asking for help to Stop it i know what animation is playing but i dont know how to stop it thats my problem
dont help me i dont need your help