How to disable character's Jump completely?

hey i was searching a method to completely disable character jump from player, i found out that even with 0 jumpheight and jumppower, if player is seated and jumps, he still gets up from seated state, i also tried to disable jump humanoid state, works but is server sided (did on client sided).

pls help :slight_smile:

2 Likes

I don’t know what you mean by this but the method of disabling the jump humanoid state works perfectly fine?

I had this same problem in the past too, I’m assuming what’s happening to you is that editing jump power is not effecting the player. What fixed it for me was going into “Game Settings” then “World”, and then looking for “Jump” and clicking the Jump Power option. There you can also set the jump power (which if you set to 0 disables jumping). You can change the Jump Power again at any time by setting the Humanoid.JumpPower property to any number you like.

Bottom Line: You have to “enable” Jump Power in Game Settings.

i mean that the jump disabling should active in a certain moment and client sided, but that actives it server-sided even from localscripts

and can it work client sided?

nvm u cant edit game settings from scripts lol

Correct, game settings can’t be changed from scripts, however once you enabled the Jump Power you can change that property from scripts.

Screenshots


Are you trying to make it where only the local player see themselves jump?

im trying to make that plr sits and he cant get up again, thats why i wanted it to be client sided

Then you can probably do something like this:

local player = game:GetService("Players").LocalPlayer
player.CharacterAdded:Wait()
local humanoid = player.Character:WaitForChild("Humanoid")
humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
    if humanoid.Sit == true then
        humanoid.JumpPower = 0
    else
        return
    end
end)

This should all work on a local script.

Note that this will only work if you select the Jump Power option in game settings.

doesnt seem to work, i still can unsit character by jumping

Strange… It works fine for me. Try referring to this video:
Prehaps I miss understood, do you want to make it so when the player sits down, they are unable to get back up?

seated but not on a seat but in air, example: ;sit command in any admin

I see now, when you run :Sit() on the server, the player is still able to get up

not really, i just touch a part, my character sits and it shouldnt be able to get up until i reset/die

heres the script function:

local function Freeze(hit)
	local humanoid = hit.Parent:FindFirstChild("Humanoid")
	if humanoid and hit.Parent == player.Character then
		humanoid.WalkSpeed = 0
		humanoid.JumpPower = 0
		humanoid.JumpHeight = 0
		humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
			if humanoid.Sit == true then
				humanoid.JumpPower = 0
			else
				return
			end
		end)
	end
end
local function Sit(hit)
	local humanoid = hit.Parent:FindFirstChild("Humanoid")
	if humanoid and hit.Parent == player.Character then
		humanoid.Sit = true
	end
end

the actual sit function

Ah, so the player isn’t actually interacting with a seat?

no, its a part making character sit

If you want to “paralyze” the player, you can disable character controls:

local Controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
Controls:Disable()

This will make it so that the player can’t move at all. This includes w, a, s, and d. You can always re enabled controls again with

Controls:Enable()

Please note that this is all on a Local Script

ok cool that works very well, thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.