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.
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.
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.
5 comments
theoretically it is possible, but are the animations in the player, character, or both?
They are in a screen GUI in the player.
can you tell me the exact tree to get there. For example: player.PlayerGui.Blah.Blah.Blah
Well the animations are located in (script.Animations.ANIMHipHop) and I located the humanoid using (game.Players.LocalPlayer.Character.Humanoid)
iam give a broad answer