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: rotation

Previous Thread :: Next Thread 
deathw8 is not online. deathw8
Joined: 04 Mar 2008
Total Posts: 102
17 Sep 2011 01:07 PM
I am making a script to generate parts at an existing (non-colide) part. Here is a snippet or the properties I have set:

brick = Instance.new("Part", game.Workspace)
brick.Name = "NewBrick"
brick.Size = Vector3.new(3, 2.4, 4)
brick.BrickColor = BrickColor.new(217)
brick.Position = Workspace.BoxSpawn1.Position

I need it to turn 90 degrees when it spawns. The location where they are supposed to spawn is already rotated. What is the easiest way to rotate these?
Report Abuse
smurf279 is not online. smurf279
Joined: 15 Mar 2010
Total Posts: 6871
17 Sep 2011 01:10 PM
Use CFrame instead of position
Report Abuse
deathw8 is not online. deathw8
Joined: 04 Mar 2008
Total Posts: 102
17 Sep 2011 01:17 PM
im having trouble understanding cframe. how would i make it so that it stays at this position 99, 6, 44.5 and rotates 90?
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
17 Sep 2011 01:20 PM
brick = Instance.new("Part", game.Workspace)
brick.Name = "NewBrick"
brick.Size = Vector3.new(3, 2.4, 4)
brick.BrickColor = BrickColor.new(217)
brick.CFrame = Workspace.BoxSpawn1.CFrame * CFrame.Angles(0, math.rad(90),0)
Report Abuse
deathw8 is not online. deathw8
Joined: 04 Mar 2008
Total Posts: 102
17 Sep 2011 01:27 PM
ok thx. ill get a hang of it soon.
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