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: How to give a Brick Velocity towards its front?

Previous Thread :: Next Thread 
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
18 Mar 2012 01:15 PM
Im a bit of a newbie with Velocities and making them go in the front direction, ALSO, how would i move a brick infront of itself, like it doesnt matter what the angle is?
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
18 Mar 2012 03:27 PM
Bump.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
18 Mar 2012 03:34 PM
    brick.Velocity = brick.CFrame * Vector3.new(0, 0, 10)
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
19 Mar 2012 04:56 PM
Thanks!
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
19 Mar 2012 04:57 PM
Can you multiply a CFrame by a vector?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Mar 2012 04:59 PM
@AFF

Yes.

† KMXD †
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
19 Mar 2012 05:27 PM
http://wiki.roblox.com/index.php/CFrame#Operators
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 02:05 PM
Theres a problem with the velocity one. It says, CFrame expected, got userdata.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
20 Mar 2012 02:31 PM
What do you mean? What Velocity one?
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 02:35 PM
brick.Velocity = brick.CFrame * Vector3.new(0, 0, 10)
On the vector3 part it expected CFrame. I did what output said and now it only Fly's off to one direction.
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 02:53 PM
Bump.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
20 Mar 2012 02:58 PM
No, `brick.Velocity = brick.CFrame * Vector3.new(0, 0, 10)` will run without error. Something else is happening.
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 02:58 PM
I will check for you.
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 03:15 PM
There is no error, But the brick FLYS ALWAYS to one direction even with changing the velocity. Ill post a new thread and link you on here.
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 03:18 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=64686415
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
20 Mar 2012 03:23 PM
You need to _continually_ set the velocity. It will keep moving in one direction until you tell it to move in another. My code doesn't magically say "Always move towards the front", it says "Move towards where the front is right now".
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
20 Mar 2012 03:24 PM
Brick.Velocity = Brick.CFrame.lookVector * [number of studs/sec.]
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 03:25 PM
As in like, it doesnt start travelling in the direction of the kart. It involves angles in some way, i should have mentioned that at the start,
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
20 Mar 2012 03:26 PM
If you want it to move strongly and continually,

local v = Instance.new("BodyVelocity")
v.velocity = Brick.lookVector * numba
v.maxForce = Vector3.new(100000,100000,100000)
v.Parent = Brick
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
20 Mar 2012 03:31 PM
With angles, use my above example but the angular velocity object is called "BodyAngularVelocity", and change .velocity to .angularvelocity, I think. Also get rid of lookVector bit. Oh and the angularvelocity property is vector 3.
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
20 Mar 2012 03:34 PM
Thanks for the help! Now i just need to sort out the welding parts.
Report Abuse
thek00lkid is not online. thek00lkid
Joined: 18 Jun 2011
Total Posts: 2778
20 Mar 2012 03:41 PM
Use the CFrame LookVector.
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