Hey how can I stop all animation in this Folder and after a while play it again?
If you have some scripting expierece you can select them all in one script and disable them or enable them i never made something for animations but try checking this page out Animations
also if you wanna stop the animation don’t use :play() but use :stop()
You can use GetPlayingAnimationTracks()
function to get a table of currently playing animations and stop the ones you want to stop, I don’t know if you are using a Humanoid
or an Animator
so I’ll give you both links:
But it doesnt work I swear I tried so many times GetPlayingAnimationTracks stop and nothing worked
You don’t do it like that, it returns a table filled with all animation tracks playing, you need to iterate through each of them and see which one you want to stop then stop it
yes look,
1. local humanoid = localPlayer.Character:WaitForChild("Humanoid")
* -- Get playing animations
2. local AnimationTracks = humanoid:GetPlayingAnimationTracks()
* -- Stop all playing animations
3. for i, track in pairs (AnimationTracks) do
4. track:Stop()
5. end
and still animation does not stop
You are just stopping animations once the script loads
Could you help me how to solve this problem?
You are only stopping the animation tracks one time when your script loads, not when you want to stop them, if you try putting your function in a while loops all animations should stop, this includes walking animations and other default animations.
Okey really thanks, is that good?
local AnimationTracks = Humanoid:GetPlayingAnimationTracks()
local d
repeat
for i, track in pairs (AnimationTracks) do
local d = track
track:Stop()
end
until d:Stop()
Stop:
table.foreach(Folder:GetDescendants(),function(i,v)if v:IsA("AnimationTrack") then v:Stop() end end)
Play:
table.foreach(Folder:GetDescendants(),function(i,v)if v:IsA("AnimationTrack") then v:Play() end end)
omg you are so good, but what is exactly Folder?
The folder/model of where the tracks are at, or the player’s character in this case
So Folder isnt Humanoid or HumanoidRootPart
it is player.Character?
local Player = game.Players.Iwantbebetter
table.foreach(Player.Character:GetDescendants(),function(i,v)if v:IsA("AnimationTrack") then v:Stop() end end)
but yea :GetPlayingAnimationTracks()
would be better for stopping a player character’s animations:
local Player = game.Players.Iwantbebetter
table.foreach(Player.Character.Humanoid:GetPlayingAnimationTracks(),function(i,v)v:Stop() end)
Animation still does play
fall animation still does play idk why
Try running:
local Player = game.Players.Iwantbebetter
Player.Character.Humanoid.PlatformStand = true