AI car help scripting

Hello I was tasked a bit ago to make an AI race car I made the script but when I add it to a complex model nothing happens here is the code
“”
local seat = script.Parent.VehicleSeat

script.Parent.body.Touched:Connect(function(hitturn)
if hitturn.Name == “Turn” then
print(“Turn”)
seat.Steer = 1
wait(1.45)
seat.Steer = 0
end
end)
‘’’
The seat max speed it 25

1 Like

Just gonna format the code:

local seat = script.Parent.VehicleSeat

script.Parent.body.Touched:Connect(function(hitturn)
    if hitturn.Name == “Turn” then
        print(“Turn”)
        seat.Steer = 1
        wait(1.45)
        seat.Steer = 0
    end
end)

Question, what is seat defined as? I know the VehicleSeat but what kind of Instance is it?

A normal seat? How would I check what it is

@Jackscarlett probably wanted to say that there are two kinds of seat instances: Seat and VehicleSeat. You have to use a VehicleSeat here, but since you can set maximal speed, we now know you are already using it.

I’ll have to ask you for further explanation in order to help.

I made a ai system for a car but it works on all other cars except the one I want