Top posting users this month | |
Latest topics | » Where to go from here.September 14th 2020, 1:20 pm by MrNicNac» Send me an EmailSeptember 14th 2020, 1:16 pm by MrNicNac» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]July 6th 2015, 7:38 pm by m27frogy» New Site PossiblyJuly 6th 2015, 4:16 pm by m27frogy» Ambassador!April 15th 2015, 11:40 pm by naknak» Boop - TagApril 13th 2015, 9:46 pm by naknak» Vip Class ScriptApril 13th 2015, 4:54 pm by naknak» Who's active?!April 13th 2015, 4:52 pm by naknak» Genesis PointJuly 17th 2014, 7:04 pm by branefreez» Reward SystemJuly 17th 2014, 5:41 am by m27frogy» Script RequestJuly 10th 2014, 11:43 am by naknak» local scripts?July 10th 2014, 11:39 am by naknak» Project: Reconstruction [Died]July 10th 2014, 11:36 am by naknak» Hi. I am new hereApril 26th 2014, 4:01 pm by altshiftkey» What's your favorite sport?January 1st 2014, 2:13 pm by m27frogy» FlashLight ScriptJanuary 1st 2014, 2:11 pm by m27frogy» Gun Making! [READ DESC]January 1st 2014, 2:10 pm by m27frogy» Hi, I am new here!November 26th 2013, 3:33 pm by Keanu73» Improve CodingOctober 26th 2013, 1:12 pm by pook03» Simple ButtonSeptember 1st 2013, 6:19 pm by branefreez |
|
| CFrame: Positioning and Rotating | |
| | Author | Message |
---|
Guest Guest
| Subject: CFrame: Positioning and Rotating November 14th 2010, 4:13 am | |
| Many people do not understand how to rotate a brick through a script. To rotate a brick, we use CFrame. Normally CFrame just positions a brick, but by adding a few extra words, it can also rotate bricks. We do this by adding *CFrame.Angles(0,0,0) after we CFrame a brick to its position. (Replace 0,0,0 with the rotation angle you want) p = Instance.new("Part") p.CFrame = CFrame.new(0, 10, 0)*CFrame.Angles(0,0,0) The first part Positions, the second part rotates. You do not need to put *CFrame.Angles to use CFrame, CFrame can also be used just for positioning bricks. I hope you learned something from my tutorial. --==[[Builderboy202]]==-- |
| | | Guest Guest
| Subject: Re: CFrame: Positioning and Rotating January 16th 2011, 11:00 pm | |
| what does Vector3.new do then? |
| | | naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: CFrame: Positioning and Rotating January 16th 2011, 11:07 pm | |
| It can be a size or position. Pretty much anything that can be classified as 3D | |
| | | Guest Guest
| Subject: Re: CFrame: Positioning and Rotating January 16th 2011, 11:24 pm | |
| So pretty much ROBLOX added an extra command? I think there's more to that. |
| | | naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: CFrame: Positioning and Rotating January 16th 2011, 11:56 pm | |
| Cframe puts an object somewhere no matter what else is there. Vector3, when used to position something, places as close to the place you specify, raising the Y value until it can fit. | |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: CFrame: Positioning and Rotating January 17th 2011, 8:39 am | |
| he forgot to tell us that the angles were in radians. :P to convert degrees to radians you can do math.rad(degrees) or (math.pi*2)/(360/degrees)
Last edited by blueymaddog on January 18th 2011, 7:34 am; edited 2 times in total | |
| | | naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: CFrame: Positioning and Rotating January 17th 2011, 12:58 pm | |
| | |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: CFrame: Positioning and Rotating January 18th 2011, 7:00 am | |
| | |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: CFrame: Positioning and Rotating January 18th 2011, 7:14 am | |
| to convert radians to degrees you can do math.deg(radians) or 360/((math.pi*2)/radians) | |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: CFrame: Positioning and Rotating November 20th 2011, 5:56 am | |
| he should really space out his tutorials in paragraphs, that way people will understand it better! | |
| | | Sponsored content
| Subject: Re: CFrame: Positioning and Rotating | |
| |
| | | | CFrame: Positioning and Rotating | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there are 8 users online :: 0 Registered, 0 Hidden and 8 Guests :: 1 Bot
None
Most users ever online was 136 on October 21st 2024, 12:16 pm
|
| Please tell us what time zone you are in here
Got a really good idea? Post it in projects and it might show up here! |
|