How do i make my AI vehicle keep going on ground

How do i make my AI vehicle keep going on ground??

  1. What do you want to achieve? - I want to make whenever my vehicle is on land it keeps going, However once there is a cliff up ahead the vehicle automatically stops

  2. What is the issue? - Seems like the vehicle stops whenever its sensor
    leave the base to another

  3. What solutions have you tried so far? - Honestly i couldn’t think of any since im not that expert into coding


Some footage here:


And here are some crucial codes just so you can check:

function onTouched(hit)
	A.LimitsEnabled = false
	B.LimitsEnabled = false
	C.LimitsEnabled = false
	D.LimitsEnabled = false
	C.AngularVelocity = 35
	D.AngularVelocity = 35
	Rot.MaxTorque = Vector3.new(0,900,0)
	Rot.P = 900
	Rot.D = 650
    -- some pathfindings stuffs --
end

function unTouched(hit)
	if hit.Parent == Paths then
		return
	end
		A.LimitsEnabled = true
		B.LimitsEnabled = true
		C.LimitsEnabled = true
		D.LimitsEnabled = true
		C.AngularVelocity = 0
		D.AngularVelocity = 0
		Rot.MaxTorque = Vector3.new(0,0,0)
		Rot.P = 0
	Rot.D = 650000000
end
2 Likes

Nvm i found it lmaoooooooooooooo

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.