How to prevent a player from jumping out of a seat

Hi everyone! How to prevent a player from jumping out of a seat? Changes jumppower didn’t help

5 Likes

Anchor their hum root part. They will never move again.

5 Likes
car.DriveSeat.ChildAdded:connect(function(child)
		if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
			--Distribute Client Interface
			car.DriveSeat.Anchored = false
		
			local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			car.DriveSeat:SetNetworkOwner(p)
			local g=script.Parent["A-Chassis Interface"]:Clone()
			g.Parent=p.PlayerGui
			child.Part1.Parent.HumanoidRootPart.Anchored = true
			wait(.2)
		game:GetService("ReplicatedStorage")["Для запуска машины"]:FireClient(game.Players:GetPlayerFromCharacter(child.Part1.Parent))
		end
	end)

Not work(
Im use system A-Chassis

4 Likes

Try changing jump HEIGHT too. Character limit.

3 Likes

Or disable jump like so. Copied from another similar post: --Disable jump
LocalPlayer.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
–Enable jump
LocalPlayer.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)

5 Likes
game:GetService("ReplicatedStorage")["Для запуска машины"].OnClientEvent:Connect(function()
	player.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
		_PBrake = false
	end)

It really works on the phone, the button disappears, but on the computer I can jump out of the car

1 Like

Note: if I’m not in the car, I can’t jump

Check scripts of your car, they’re likely interfering.

1 Like

I checked all the scripts of my machine for the presence of the “jump” tag and found nothing that could lead to it. Unfortunately, your method didn’t quite suit me(

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