Problem with car exit

So recently i made some cars but im having problems which is the player getting stuck inside the car when exiting i actually made a script which clicks e to tp player to prevent getting stuck but if the player jump exit the vehicle the player gets stuck so i think i need to make player shouldnt jump when its in the car,but i dont know how to do it

What im trying to do basically is prevent the player from jumping if the player is in seat

You can test out the car game here

Pls help I really need to fix it ASAP!!:sob::sob:

3 Likes

You may want to use ContextActionService

ContextActionService:UnbindAction("jumpAction") --Stop jump
ContextActionService:BindAction("jumpAction") --Enable Jump

Havent tested but i think it should work

i just wanna disable jump when player is sitting

make sure you check the problem in the game before posting

If that doesn’t work this should…

local Controller = require(game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls()

Controller:Disable() --disables movement
Controller:Enable() --enables movement

Since your seated you won’t need to move at all

Usually you would override the Enum.KeyCode.Space, then unbind the action though i see that as a hastle

You can disable jumping by setting the player’s JumpPower to 0.

1 Like

omg Thanks so much it worked!!! Youre a god

1 Like