generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Is there a way to make a self moving car?

Previous Thread :: Next Thread 
andrew900701 is not online. andrew900701
Joined: 15 Jul 2008
Total Posts: 21519
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
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
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 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
11 Jul 2014 04:22 PM
make it moving using bodyforce or CFrame c:
Report Abuse
andrew900701 is not online. andrew900701
Joined: 15 Jul 2008
Total Posts: 21519
11 Jul 2014 04:25 PM
ok thanks
Report Abuse
databrain is not online. 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
robokittydestroyer is not online. robokittydestroyer
Joined: 20 Jul 2010
Total Posts: 311
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
andrew900701 is not online. andrew900701
Joined: 15 Jul 2008
Total Posts: 21519
11 Jul 2014 04:50 PM
ok thanks this really helps
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image