AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 06:44 AM |
Ok, so, I'm learning to script by changing existing scripts, but what does the line below mean? I understand the weld1.C1 = CFrame.new(-0.3, 1.09, 0.6), that's just where the arm is positioned in the armweld script. But I haven't got a clue what the other bit is. It doesn't seem to change anything. Is it important?
weld1.C1 = CFrame.new(-0.3, 1.09, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
Thanks :D |
|
|
| Report Abuse |
|
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 06:50 AM |
Uhh... Anyone alive who can help me? lol |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 20 Aug 2012 06:55 AM |
fromEulerAnglesXYZ is the same as CFrame.Angles()
fromEulerAnglesXYZ is the old name..
|
|
|
| Report Abuse |
|
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 06:56 AM |
oh right
So does it rotate them then? And can I replace the name in the script? |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 06:57 AM |
Correct, it's the exact same as CFrame.Angles. Here's an example:
game.Workspace.Brick.CFrame = game.Workspace.Brick.CFrame * CFrame.Angles(1,1,1) |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 20 Aug 2012 06:59 AM |
You can replace it with CFrame.Angles()
Angles like it says will only rotate it.
Angles has three Parameters.
Angles(xrotation, yrotation, zrotation)
So if I wanna to make a full circle at the y I will do
Game.Workspace.Part.CFrame = CFrame.Angles(0,math.rad(360), 0)
|
|
|
| Report Abuse |
|
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 07:01 AM |
Just tested that one right now. Thanks for helping me :). |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 20 Aug 2012 07:01 AM |
Not a problem.
[TOPIC CLOSED]
|
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 07:02 AM |
Here's a better example of a shape creating script I made:
ang = 0.5 for i = 1,63 do p = Instance.new("Part",game.Workspace) p.FormFactor = "Symmetric" p.Size = Vector3.new(60,1,60) p.BrickColor = BrickColor.random() p.Anchored = true p.BottomSurface = 0 p.TopSurface = 0 p.CFrame = CFrame.new(0,30,0) p.CFrame = p.CFrame * CFrame.Angles(ang,0,0) ang = ang + 0.05 wait() end
This just makes the approx. size of a 60x60 multicolored cylinder. |
|
|
| Report Abuse |
|
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 07:04 AM |
@juriaan
Game.Workspace.Part.CFrame = CFrame.Angles(0,math.rad(360), 0)
Ah, I get it.
Thanks again! |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 20 Aug 2012 07:05 AM |
@Airx
If you wanna to know more about this Subject (CFrame) then visit this wiki page.
http://wiki.roblox.com/index.php/Cookbook_(Chapter_2)
|
|
|
| Report Abuse |
|
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 07:08 AM |
@Ceaseless
lol that script makes a nice pattern.
I'll have to experiment with that. |
|
|
| Report Abuse |
|
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 20 Aug 2012 07:08 AM |
@juriaan
Whoops, I probably should've checked there in the first place.. lol
I'll give that a read. |
|
|
| Report Abuse |
|
|
| |
|