So I made car collision group, but I have a problem I need to disable seat on touch and only for it to be available to sit in from prompt, since car body have collision i need to make a part which will teleport to second part which will be DriveSeat, and when I do this, I teleport on top of the car.
Also I would need to make that when you jump from car you don’t stay inside but get teleported outside.
just set VehicleSeat.Disabled
to true so you dont get seated when you touch it. It’s literally in the docs, man. And let a server script seat the character when the prompt is activated
local carBounds = car:GetBoundingBox() -- the box that is shown when you select the car in studio (Vector3)
-- run this when character exits seat
local carCFrame = car:GetPivot()
local charCFrameUponExitingCar = carCFrame:ToWorldSpace(CFrame.new(carBounds.X + 5, 0, 0))
-- basically pivots the character 5 studs sideways of the car using its bounding box to calculate it.
-- might not always be super reliable though
character:PivotTo(charCFrameUponExitingCar)
1 Like
Could you help me where do I put these scripts? I’m new in scripting, I know to read them change them fix them but this is new for me.