The script below is a certain function in a modulescript that loads an idle animation after being called from a localscript to do so.
The issue is that the print i used to identify if whatever the first argument being passed in the function is a humanoid object or not, it fires but :LoadAnimation() still errors on the line i put the full error’s name on.
Even though there are a lot of topics on the :LoadAnimation() error, those methods of finding humanoid revolve around waiting for it to load after the character loads with :WaitForChild(“Humanoid”) or repeat loops but i could not find any topics similar to :LoadAnimation() on a Humanoid object being passed through an argument into a modulescript
The modulescript function:
function AnimationModule.LoadIdle(Humanoid,Tool) ConnectM6D:FireServer(Tool) if Humanoid:IsA("Humanoid") then print("Humanoid Detected") local Animator = Humanoid:WaitForChild("Animator") if Animator then Idle = Animator:LoadAnimation(idleanim) -- LoadAnimation requires the Humanoid object (PlayerName.Humanoid) to be a descendant of the game object Idle:Play() end end end
In the localscript used to call the function there is another humanoid print that does fire when the humanoid object is present in the localplayer’s character and is used as the first argument.