Hello! I am making an A-Chassis pit maneuver system and I want it so that whenever the Pit Hitter hits the pit Detector it slows the car down until it goes to a complete stop. In other words, I want too forcibly PBrake the car. Any suggestions?
You shouldn’t ask people to design entire systems for you, but if that’s not what you’re asking, I can give you a simple concept
I’m going to make an example situation, just so it’s easier for me to explain this concept. A police car is trying to pit maneuver a car which is speeding
You could use raycasting on the front of the police car which shoots out a ray in front of the police car, and use that ray to detect if there is a vehicle in front of the police car. If there is a car in front of the police car, you can pit maneuver the car by either slowing down the car’s speed, popping the car’s tires, or really anything you want
If you don’t know how to use raycasting, here is a devforum link: Intro to Raycasting
Or in simpler terms, this is how you use it:
local TestRay = workspace:RayCast(originPosition, direction, raycastParameters)
(raycastParameters are optional)
This solution i posted before might help push you in the right direction:
Instead of upon exit just apply the pbrake when the vehicle is Touched.
Hello! I forgot to mention earlier that I had already made the hitting and detecting side of the script, and what I was wanting here is what @RMofSBI suggested. Thanks for atleast trying to help!
Yes! This is exactly what I was wanting to find. I just could not find anything pbrake related in any of the scripts or online. Thanks once again, have a lovely night!