Faulty vehicle exit script

It worked, but… What in the world is happening?

Beautiful! You got out the car in one piece!

2 Likes

I’m laughing way too hard at that.
Is it possible the player is being caught by another seat?
It looks like he’s meant to be on the left side, but while the car is entering 17 dimensions, he’s teleported to the right side of the car momentarily, appearing to be seated.

1 Like

All the seats have disabled enabled which doesn’t let the player get caught up on the other seats. I also set the X value to -5, and it flung me to the 4th dimension for a wee bit.

Try changing around with the value. Maybe try 10 then -10 and see what happens when you do that. It might be the Z value I don’t know.
It’s possible the character is clipping the car.
I can’t remember if I asked, but have you tried making the car uncollidable for that small period of time?

Changed it to 10 and -10, it flung me to the 4th dimension…

What about turning off collisions?

Turning off the collisions doesn’t work as well.

Are you able to send a short video?

it glitches the suspension actually

Are you setting the uncollision before or after the player is deseated?

The collision is disabled most of the time

Do you have another script teleporting the player? He still seems to be going to the right then back to the left and outside the car.
Are you able to paste the script you currently have to make him exit?

1 Like

Isn’t this type of behaviour caused by NAN position values?

Whoops, I completely forgot to disable the script. It doesn’t do the thing, but it glitches the suspension for some reason.

No worries, most of my issues are caused by forgetting to disable other scripts.
Can I see what you currently have to eject your time traveller and if possible, another clip?
Hopefully we’re getting somewhere!

1 Like

It also exits to the right sometimes

I just realised, the script works fine. You’re being teleported to the left, that’s correct. However, there is one small issue. Either the entire world except for you and the car is moving to the right, or the car is moving with you. Let’s try adding a very small wait after you make the character stop sitting.

Adding a wait right after the jump doesn’t change the player’s position anymore. I think the reason for that is that the localscript gets destroyed upon exiting the vehicle.

Oh, that might make sense. Is it possible to make a local script inside the player itself that ejects them, then deletes itself after it has finished its operations?
Are you using jump or sit?