|
| 11 Jul 2014 04:20 PM |
I was wondering if anybody knew of a way to make a car move on its own.
Any help is appreciated :) |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 04:22 PM |
Well, this would depend entirely on how you intend to make it move, you could use something such as, game.Workspace.ModelCar:MoveTo() |
|
|
| Report Abuse |
|
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 11 Jul 2014 04:22 PM |
| make it moving using bodyforce or CFrame c: |
|
|
| Report Abuse |
|
|
| |
|
databrain
|
  |
| Joined: 01 Jan 2013 |
| Total Posts: 3342 |
|
|
| 11 Jul 2014 04:26 PM |
I don't believe there's a way to control a VehicleSeat's inputs by script. Just use a main part as the stored "model CFrame", and use something like this:
local origin = {} for _,v in pairs((the car):getChildren()) do origin[v] = (new CFrame):toWorldSpace((main part).CFrame:toObjectSpace(v)) end --To store position relative to the main part for p,cframe in pairs(origin) do p.CFrame = cframe end
Use this to CFrame the whole car. If it is unanchored, I believe you only need to change the CFrame of the main part, rather than all of that, if it is all connected by joints.
|
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 04:41 PM |
| It is possible to control a car via script, just as long no one is sitting in the VehicleSeat. I set the throttle to 1, then set the steer to a random number between -1 and 1 every second. It was working perfectly until it drove itself over the edge. You could even disable the seat and it will still run. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2014 04:50 PM |
| ok thanks this really helps |
|
|
| Report Abuse |
|
|