How would i add the R6 Animations like walk jump!

Hey everyone i was wondering how i could add the R6 Animations to this script
in the rig theres a local script called Animations but how would i add it so when it moves it plays the walking animation like the normal R6 and how do i add jump and normal other animations??

local rig = game.Workspace.Rig
local click = game.Workspace.Part.ClickDetector

click.MouseClick:Connect(function()
	rig.Humanoid:MoveTo(click.Parent.Position)
end)

I’m assuming that this is an npc, if so, you can find server script conversions of the animate script in the toolbox if you look up something like “r6 server animate”

Here is some documentation that could help: Humanoid states.

To summarize the documentation:
Humanoids have different states that they exist in, if they are running, jumping, falling, etc. You can also connect functions to these states, for example:

rig.HumanoidState.StateChanged:Connect(function()

 if rig.Humanoid.Running then

  RunAnimation:Play() -- plays the running animation when the humanoid is running

 elseif rig.Humanoid.Jumping then

  JumpAnimation:Play -- plays the jumping animation when the Humanoid is jumping

 end --I think you have the general idea

end)

I hope the helps

also, if you are using this script on an NPC then you will want to change the script from a local script to a server script like @Datsun4885 said

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.