Enter/Exit Vehicle

I was wondering if someone could help me with this script. i have looked at the 2d platformer tutorial for the vehicle enter/exit but it’s not what i wanted. Could someone please write this script for me? I know it has something to do with switching controllers but i need the player to dissapear when entering and appear at the vehicles location when exiting…!!!

Is there a bounty on this script?

as in pay? How much is this script worth?

Maybe somebody has it already and will share, maybe somebody needs some lunch money and will write it.
It’s probably as simple as disabling the component controlling the player’s controls and enable the vehicle’s control component.

ok. And i have one more question. In my game, i have my weapon small inside my character controller so the gun cant go partially into walls. But i need to add a collider to the gun so i can have melee. When i add the collider, i cant move because the mesh collider of the gun and the character controller screw with eachother. how can i ignore the collision between the two, but not collison between gun and enemy?

Something like this could be from very simple to very complex, and its implementation depends 100% on how the rest of your project is designed.

You can’t just write a script and expect it to work, drag and drop, with any situation. Nor can you expect to find one that does.

You need to read about layers and how they relate to collisions. The gun collider should not be active all the time anyway, just when you are using it for melee.