How to make a player jump all the time

Hello :wave:, please tell me how to make the player constantly jumping and can not stop, I searched everywhere, but never found the answer to my question. I mean the player should jump ALWAYS WITHOUT STOPPING

please help :pray:

and also please tell me where to add this script?

6 Likes
game.Players.PlayerAdded:Connect(function(plr)
game:GetService("RunService").Heartbeat:Connect(function()
plr:WaitForChild("Character"):WaitForChild("Humanoid").Jump
end)
end)
1 Like

there’s some kind of mistake and also please tell me where to add this script?
image

2 Likes

i forgot to put

= true

after .jump

1 Like

and also script needs to be in serverscriptservice as server script

Or better

local humanoid -- define humanoid here

humanoid:ChangeState(Enum.HumanoidStateType.Jumping) -- jumps

humanoid.StateChanged:Connect(function()
  if humanoid:GetState() ~= Enum.HumanoidStateType.Jumping then
    -- fires everytime the player stops jumping
    humanoid:ChangeState(Enum.HumanoidStateType.Jumping) --jumps
  end
end)
2 Likes

I’m sorry there’s a mistake, and I’m sorry I don’t know anything about scripting.
image

The mistake is that the Humanoid is not defined. It is what known as nil, which is nothing. I think the best way to do this is have everything in a function like so.
Script in ServerScriptService:

game.Players.PlayerAdded:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local humanoid = Character:WaitForChild(“Humanoid”)

 humanoid:ChangeState(Enum.HumanoidStateType.Jumping) -- jumps

 humanoid.StateChanged:Connect(function()
   if humanoid:GetState() ~= Enum.HumanoidStateType.Jumping then
-- fires everytime the player stops jumping
humanoid:ChangeState(Enum.HumanoidStateType.Jumping) --jumps

end
end)
end)

Hopes this helps! Have a wonderful day! :slight_smile:

1 Like

No, that didn’t help, but thank you.

game.Players.PlayerAdded:Connect(function(plr)
game:GetService("RunService").Heartbeat:Connect(function()
plr:WaitForChild("Character"):WaitForChild("Humanoid").Jump = true
end)
end)

just use this in serverscriptservice as server script
and it will work simply

1 Like

I tried it, but I didn’t jump without my input. And I want the player to jump without my input, that is, by himself. I’m sorry, maybe I’m not explaining it right or doing it wrong, but I’m downloading your scripts in serverscriptservice, but nothing is getting done

You have to define the humanoid. Assuming this is a LocalScript in the player’s Character (achieved via putting your script in StarterCharacterScripts), the humanoid can be defined like so:

local humanoid = script.Parent:WaitForChild("Humanoid")

Then you can test it out and see if it works or doesn’t.

1 Like

Insert this LocalScript into StarterPlayer < StarterCharacterScripts.

local humanoid = script.Parent:WaitForChild("Humanoid")

game:GetService("RunService").Heartbeat:Connect(function()
	humanoid.Jump = true
end)

Hope this helps!

2 Likes