Side note, but do consider looking at the Humanoid’s Animator object, it’s more modern
wait()
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local anim = AnimationInstance
script.Parent.MouseButton1Down:Connect(function()
local Animator = Humanoid:WaitForChild("Animator")
local LoadAnim = Animator:LoadAnimation(anim)
LoadAnim:Play()
end)
I’m frequently on here! Just attempting to help others whilst at the same time being chill & doing it with a humorous twist! Also for future reference, here’s a general term on what “deprecated” is from an analogy if you’re not certain on what it is: