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

Set Jump Help?

Asked by
22To 70
9 years ago

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)
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. ImageLabel 1541 — 9y
0
well i made it more clearer here so 22To 70 — 9y
0
The only way to do this is to give the character some body force. EzraNehemiah_TF2 3552 — 9y
0
and how to do that? 22To 70 — 9y
View all comments (2 more)
0
Look it up EzraNehemiah_TF2 3552 — 9y
0
... 22To 70 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

** 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..

0
Thanks Dude..It actually works fine 22To 70 — 9y
Ad

Answer this question