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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help with launching things?

Previous Thread :: Next Thread 
UnforeseenVice is not online. UnforeseenVice
Joined: 27 Mar 2009
Total Posts: 1078
05 Mar 2016 07:34 PM
Hello, im trying to use a script to launch several blocks in opposite directions. I have a box, and I am trying to make the walls of the box all launch out in separate directions no matter how the box is turned.

Im currently using Velocity to launch the walls, but am not sure how to make the launch in the directions they need to go.

Any help is appreciated.
Report Abuse
UnforeseenVice is not online. UnforeseenVice
Joined: 27 Mar 2009
Total Posts: 1078
05 Mar 2016 09:54 PM
bumperino
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
05 Mar 2016 09:58 PM
Use Wall.CFrame.lookVector when you change the velocities.

http://wiki.roblox.com/index.php?title=CFrame#Properties
Report Abuse
UnforeseenVice is not online. UnforeseenVice
Joined: 27 Mar 2009
Total Posts: 1078
05 Mar 2016 10:02 PM
Im really bad at this, I dont understand what the line of code would be even after looking at the wiki page.

Wall.CFrame.lookVector = CFrame.new()?
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
05 Mar 2016 10:07 PM
Assuming the direction you want them flying is the direction they're facing, you can try:

local Box = workspace.Box

for _,Wall in pairs(Box:children()) do
Wall.Velocity = Wall.CFrame.lookVector*100
end
Report Abuse
UnforeseenVice is not online. UnforeseenVice
Joined: 27 Mar 2009
Total Posts: 1078
05 Mar 2016 10:11 PM
Thanks I understand it now, I will come up with something. That code just throws the whole room
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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