Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a humanoid npc jump?

Asked by 10 years ago

Just a regular jumping animation

1 answer

Log in to vote
1
Answered by
Kozero 120
10 years ago

Setting the Jump to true in an Humanoid so everytime Jump() is called the NPC will jump.

function Jump()
local NPC= Workspace.NPC:FindFirstChild("Humanoid")
if NPC then
NPC.Jump=true
end
end

As you secondarily wanted to learn how to make the NPC jump constantly .You would use the while loop

function Jump()
local NPC= Workspace.NPC:FindFirstChild("Humanoid")
if NPC then
while wait (1) do
NPC.Jump=true
end
end

In the script above when the function Jump() is called the humanoid's jump property will constantly be set to true every time second since the property itself is set to false automatically every time it is set to true.

0
This Also works with the propeties "Sit" and "PlatformStand" but they don't automatically change to false until the player jumps or the properties itself is manually changed to false. Kozero 120 — 10y
0
how do i make it constantly jump? Shaydesilva 85 — 10y
0
Answered! Kozero 120 — 10y
Ad

Answer this question