I have a car rig, but the car fails to climb up hills. If I increase the speed it can, but I need cars of all speeds to be able to climb this hill, without losing any speed
Again, the car should maintain a constant speed, it shouldn’t slow down as it tries going up. I’ve tried messing with the wheel friction, but it offered no real change
self.Trove:Connect(RunService.Stepped, function(deltaTime)
-- Steer
local SteerGoal = -self.Seat.SteerFloat * vehicleData.TurnRadius
Steer = Steer + (SteerGoal - Steer) * math.min(deltaTime * vehicleData.TurnSpeed, 1)
AttachmentFL.Orientation = Vector3.new(0, Steer, -90)
AttachmentFR.Orientation = Vector3.new(0, Steer, -90)
-- Throttle
local ThrottleGoal = self.Seat.ThrottleFloat
Throttle = Throttle + (ThrottleGoal - Throttle) * math.min(deltaTime * vehicleData.TurnSpeed, 1)
local Torque = self.Seat.Torque
local Speed = self.Seat.MaxSpeed * Throttle
-- Set Torque
CylindricalFL.MotorMaxTorque = Torque
CylindricalFR.MotorMaxTorque = Torque
CylindricalRL.MotorMaxTorque = Torque
CylindricalRR.MotorMaxTorque = Torque
-- Set AngularVelocity
CylindricalFL.AngularVelocity = Speed
CylindricalFR.AngularVelocity = -Speed
CylindricalRL.AngularVelocity = Speed
CylindricalRR.AngularVelocity = -Speed
end)