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.
It is a LOCAL SCRIPT.
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)

2 comments
https://scriptinghelpers.org/blog/it-works-in-studio-but-not-online
Try using WaitForChild to stop any loading error.