Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Set Jump Help?

I want the player to jump a certain hieght but i also want this script to keep running when they die...here is wha ti tried but wont work can u help me?

function onPlayerEntered(newPlayer)
newPlayer.Character.Humanoid.Jump = 40
end
game.Players.ChildAdded:connect(onPlayerEntered)

function onPlayerRespawned(newPlayer)
h = newPlayer:findFirstChild("Humanoid")
if h ~= nil then
if game.Workspace:findFirstChild(h.Parent.Name) ~= nil then
h.Jump = 40 --Make sure this number is the same as the number above.
end
end
end
game.Workspace.ChildAdded:connect(onPlayerRespawned)

6 comments

0

You've already asked this question earlier today. If the answers on there aren't what you are seeking, ask for clarification instead of creating new requests.

0

well i made it more clearer here so

0

The only way to do this is to give the character some body force.

0

and how to do that?

0

Look it up

0

...

1 answer

✓ Accepted answer

** You cant Really Set the jump height by putting the number..Sadly roblox doesnt accept that. You will have to use bodyforce so here what you can do.**

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
b = Instance.new("BodyForce")
b.Parent = c.HumanoidRootPart
b.force = Vector3.new(0,1800,0)
end)
end)

This should be placed in workspace and is just a regular script You can change 1800 to what you want but make sure u understand what your doing to it.Pm me if u need help..

1 comment

0

Thanks Dude..It actually works fine

This discussion is preserved as it was. New answers, comments, and votes are closed.