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