How to prevent a player from jumping out of a seat

Sadly I have no further input. Hope you figure it out!

1 Like

Just thought of one thing. Place a seat part and test with that. Compare the results of the car. Is the car a freemodel btw?

1 Like

No Jumping

--StarterPlayer.StarterCharacterScripts.LocalScript
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
	humanoid.Jump = false
end)
1 Like

jumping doesn’t really work, but clicking on the jump throws me out of the car. And so yes, I can’t jump

No, I took the car system from the toolbox and took the car separately and mixed it all, now I’ll try

After checking this on a regular seat, I did not succeed. Apparently there is no way and no one can help me in this topic, I hope in a new one, where I asked in plain text how to deal with the problem, they will help me

You can set the Player Humanoid JumpPower property to 0 in order to disable jumping entirely. (which means they won’t be able to jump out of a seat)

2 Likes

That’s right, he disables jumping. But still, when I press the jump button, I get thrown out of the car without jumping

Checking in Studio (including device emulation), that should not be what happens.
Setting the JumpPower to 0 should entirely disable getting out of the vehicle by jumping. (edit: in fact, it should entirely remove the jump button on mobile)

Check the car system to see if there’s anything in there that would get the player out of the car when they press the Mobile jump button.

1 Like

I set the jump height to 0 and was still able to jump out of the seat (I created everything new and without scripts) for test

and jumping also works with PC

Not Jump Height, Jump Power.
Humanoid.JumpPower = 0

1 Like

Changing the JumpPower or JumpHeight property of Humanoid won’t help because the jump is still registering, therefore the player gets out.

Found this forum answering your question Though

Let me know if anything works! or doesnt

1 Like

I think this should work, I’ll definitely check it tomorrow. But won’t there be bugs if, when the player sits down, the gui opens, and when the player jumps, it becomes invisible?

Use that script and also set Game Settings/World/Jump … Height and Power 0
I use this in a game where I don’t want the player to jump out of a seat.

1 Like

Your method works if you only need to remove the ability to jump, but I need the player to be unable to jump out of the chair. Systematically, when the player presses the jump button, a deletion occurs weld

“How to prevent a player from jumping out of a seat”
“I need the player to be unable to jump out of the chair.”

Then you set it when you don’t want them to jumping out of a seat.

2 Likes

Unfortunately, sometimes the translator does not translate exactly what I would like to say

Thank you all for your attempts to help me, I really appreciate it. But I found a way that helped me.

local ContextActionService = game:GetService('ContextActionService')
ContextActionService:UnbindAction("jumpAction")
2 Likes

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