I’m trying to load an animation to the humanoid, but the humanoid seems to be nil, here’s the script:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:FindFirstChildOfClass("Humanoid")
local tool = script.Parent
local anim = script.Anim
local debounce = false
local animTrack = hum:LoadAnimation(anim)
And the error is:
attempt to index nil with 'LoadAnimation'