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: Moving Forwards

Previous Thread :: Next Thread 
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
12 Jul 2014 08:48 PM
So I'm making a plane. It turns and everything, but I don't know how to make it go forward.

Here's a video I found that looks similar to what I want to accomplish:
http://www.youtube.com/watch?v=iDKjbdzn19M&list=UUNeNuB9NUkHlfM0IA4qFRAg

-----------------------------------------------------------------------------------------
Plane script:

repeat wait() until game:service'Players'.LocalPlayer and game:service'Players'.LocalPlayer.Character
local p=game:service'Players'.LocalPlayer
local cam=workspace.CurrentCamera
bg=workspace.Plane.Main.BodyGyro
bv=workspace.Plane.Main.BodyVelocity
bv.maxForce=Vector3.new(1000,1000,1000)
local m=p:GetMouse()
cam.CameraSubject=workspace.Plane.Part

local speed=100 -- You can change that

game:service'RunService'.RenderStepped:connect(function()
cam.CoordinateFrame=workspace.Plane.Part.CFrame
end)
m.Move:connect(function()
bg.cframe=CFrame.new(workspace.Plane.Main.CFrame.p,m.hit.p)
bv.velocity=(m.hit.p-workspace.Plane.Main.Position).unit*speed
end)

------------------------------------------------------------------------------------------

Link to the model in case needed:
http://www.roblox.com/PLANE-item?id=166080413
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
12 Jul 2014 08:53 PM
1
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
12 Jul 2014 09:00 PM
2
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
12 Jul 2014 09:12 PM
I'll get back to ya in an hour or two.
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
12 Jul 2014 10:39 PM
3
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
12 Jul 2014 10:41 PM
bv.velocity=CFrame.new(workspace.Plane.Main.CFrame.p,m.hit.p).lookVector*speed

Alt. of Jetta765214
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
12 Jul 2014 10:58 PM
Jetta, it was a bit more complicated than that.

http://www.roblox.com/Plane-for-COOLDUDE1100-item?id=166099800
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
12 Jul 2014 11:00 PM
Meh, it was what he requested, and it is easy enough to adjust to make it more complex.

Alt. of Jetta765214
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
12 Jul 2014 11:19 PM
Thanks guys! Really helpful and I'll try the plane tomorrow.
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