Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to stop all Animations?

I want to stop all the animations that are happening on the Local Player. Is there a way I can do this using tables or what?

All feedback is great. Thanks.

5 comments

0

theoretically it is possible, but are the animations in the player, character, or both?

0

They are in a screen GUI in the player.

0

can you tell me the exact tree to get there. For example: player.PlayerGui.Blah.Blah.Blah

0

Well the animations are located in (script.Animations.ANIMHipHop) and I located the humanoid using (game.Players.LocalPlayer.Character.Humanoid)

0

iam give a broad answer

2 answers

im not 100% sure if this would necessarily "stop" the animation. But it would destroy it so therefor it would be nothing else to play >.>

local player = game.Players.LocalPlayer
for i,v in pairs(player.PlayerGui.ScreenGui.Script:GetChildren())do
	if v:IsA("Animation") then
	v:Destroy()
	end
end

If you want to temporarily disable them, the simplest way to do so is storing their AnimationId and changing it to an empty string to disable them.

local animation_id = Animation.AnimationId
Animation.AnimationId = "" --disabled
--later
Animation.AnimationId = animation_id --enabled

For multiple animations, I suggest looping through them and storing their AnimationIds in a table.

This discussion is preserved as it was. New answers, comments, and votes are closed.