Someone assisted me in getting this far, but I wanted to know how to get the code working for studios, but not in game, what is stopping it from actually working?

Thanks in advance.

local player = game.Players.LocalPlayer

local character = player.Character

local humanoid = character.Humanoid

script.Parent.MouseButton1Click:Connect(function()

local anims = humanoid:GetPlayingAnimationTracks()

for i,v in pairs(anims) do

v:Stop()

end

end)

 

script.Parent.MouseButton1Click:Connect(function()

local anims = humanoid:GetPlayingAnimationTracks()

for i,v in pairs(anims) do

if v.Name == "Anim" then

v:Stop()

end

end

end)

1 comment

0

make sure you are using local script