Hi everyone! How to prevent a player from jumping out of a seat? Changes jumppower didn’t help
Anchor their hum root part. They will never move again.
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
Try changing jump HEIGHT too. Character limit.
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)
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
Note: if I’m not in the car, I can’t jump
Check scripts of your car, they’re likely interfering.
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!
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?
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)
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)
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.
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