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 |
|
| CFraming for Beginners, Just Like Cheese for a Sandwich | |
| |
Did this assist at all? | Yes | | 100% | [ 2 ] | No | | 0% | [ 0 ] | Uhh, sure... (Man, this tutorial sucked!) | | 0% | [ 0 ] |
| Total Votes : 2 | | |
| Author | Message |
---|
Zarcius Novice Scripter
Posts : 8 Join date : 2011-03-07 Age : 27 Location : The Depths of my Mind
| Subject: CFraming for Beginners, Just Like Cheese for a Sandwich March 7th 2011, 3:20 pm | |
| Using CFrame (Coordinate Frame) is easy. You just need a few simple steps to get you started: 1. Open up ROBLOX Studio 2. Make sure you have the Command bar open (View>Toolbars>Command) 3. Make a new place (Studio>File>New).
Alrighty, starting off. Insert two parts in your place, you can call them whatever you like. I'll be using A and B. (Make sure that the parts have different names, otherwise CFraming becomes difficult.) Anchor both parts. Now you can begin CFraming.
1: Say you wanted the two parts to intersect. That's pretty easy, just use this line of code in the command bar: workspace.A.CFrame = workspace.B.CFrame Hit enter, and voila! You have yourself 2 parts in 1!
2: Say you wanted to rotate one of the parts at a 45 degree angle. CFrame uses a different measuring system called radians. To fix this, we'll use this line of code: workspace.B.CFrame = workspace.B.CFrame * CFrame.Angles(math.deg(45),0,0) Now you'll notice this looks quite different from the previous command. This is because we don't want to change the regular position of the brick, just what angle it points to. The asterisk, meaning multiply, when used in CFraming just means to change the position of it by n units.
3: Now say you wanted to bring part A back out of Part B. To achieve this, you'll use something like the codes of part A and B put together: workspace.A.CFrame = workspace.A.CFrame * CFrame.new(4, 0, 0) Here, you'll notice that after the asterisk, we used another CFrame.new instead of CFrame.Angles. This is because CFrame.Angles (Or CFrame.FromEulerAnglesXYZ, as is the full name) simply changes the part's angle (duh), while CFrame.new changes the part's position.
Congratulations, you now know how to CFrame! Hope you understood and enjoyed my tutorial, and make something awesome with it!
Note: this is not the only CFraming techniques. There are more, this is just a basic tutorial. | |
| | | blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: CFraming for Beginners, Just Like Cheese for a Sandwich November 28th 2011, 6:51 am | |
| looks like the votes are going your way with your poll! | |
| | | | CFraming for Beginners, Just Like Cheese for a Sandwich | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest :: 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! |
|