Kolbxyz
(Kolb)
March 9, 2022, 12:49pm
#1
What do I want to achieve?
I’m trying to make an autopilot for a car.
What is the issue?
Is it possible to simulate keyboard input (I don’t think so) or change seat properties (I don’t think so).
What solutions have I tried so far?
I used BodyPosition and BodyGyro but it’s not that good and you can’t steer…
The project link : Tesla autopilot | LEVEL 1 - Roblox
Any idea on how I could do that (if it’s possible but I saw people who made auto driving cars)
Qin2007
(Qin2007)
March 9, 2022, 2:42pm
#2
Kolbxyz:
simulate keyboard
you cant do that using the roblox services but you can fire the function in your code not using those
ehh
seat.property = 'new value'
???
You need to use RayCast (also to avoid the car going into buildings) and use Cylindrical constraints instead of body movers and set the correct properties for them in order to move the car and steer
Deadwoodx
(Deadwoodx)
March 9, 2022, 3:33pm
#4
This is a roblox AI auto pilot, you can type what ever you want to go to, it uses AI to find the location out of your message and will take you there, like tesla auto pilot
I never saw tesla, so this car might be funny
[wood car autopilot]
I’ve tested this AI Autopilot on a much grander map
[roblox ai auto pilot test]
I’ve already made one auto pilot long ago, its quite difficulty to make, you need to know these before making it:
Path finding service
Vector Force
Align Position
Align Orientation
Ray casting
Object and World space
Relative attachments
Limits of all these things
Also I already made a game like this, and it works, and is due in release, sorry if rude, but please don't make it, I already made it and is done too
1 Like
Kolbxyz
(Kolb)
March 9, 2022, 3:52pm
#5
I’m using raycast and part.Touched:Connect()
Kolbxyz
(Kolb)
March 9, 2022, 3:52pm
#6
Seat.Steer = 1 doesn’t work (it’ll changes it back to 0)
Qin2007
(Qin2007)
March 9, 2022, 3:55pm
#7
Kolbxyz
(Kolb)
March 9, 2022, 3:55pm
#8
Okay, thanks, but I want to make my own autopilot to custom it and I also want to add more features.
Kolbxyz
(Kolb)
March 9, 2022, 3:56pm
#9
Yeah but even by spamming the game, it doesn’t steer…
Deadwoodx
(Deadwoodx)
March 9, 2022, 5:01pm
#10
The vehicle seat, and user input service is commonly used for manual car movement, while auto pilot does not need user input and can go on its own
The steer property value is like read only even if you can change it that won’t make the car steer and should be used only to know if the player wants to steer right or left
Deadwoodx
(Deadwoodx)
March 9, 2022, 5:37pm
#12
No you can change the value of it using scripts, thats what I do in my manual and auto pilot car
Kolbxyz
(Kolb)
March 9, 2022, 6:51pm
#13
Does it work? I mean, for me it doesn’t, it changes back to 0 even with
game:GetService("RunService").Heartbeat:Connect(function())
Seat.Steer = 1
end)
while wait() do
Seat.Steer = 1
end
I said “like read only” because I don’t see any usefulness in setting that value
Kolbxyz
(Kolb)
March 11, 2022, 9:24pm
#15
But how could I make the car steer then?
As I said in a previous post use Cylindrical constraints (that’s how I would do it for a car driven by a player buy instead of basing the system on a player’s input make an AI) and set the correct actuator type. This could help you to unsteand how to make the car (not the AI)
How to Rig a Car
[lowpolycar_thumbnail]
Rigging a car in Roblox can be hard. Scripting it can be harder. In this four-part series, I walk through the basics of rigging a 3D-modeled car and some basic scripting!
Pick up the car model first!
Part 1 - Setup
Export your car and put it together in Studio.
Part 2 - Rigging the Constraints
Set up all the various attachments and constraints.
Part 3 - Server Scripting
Write the server-side script to handle the c…