12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 10 Mar 2013 09:18 AM |
function tablet() for i = 1, 8 do local p = Instance.new("Part", workspace.Player1) Instance.new("BodyForce", p).force = Vector3.new(0,0,0) p.Size = Vector3.new(2,2,2) p.BrickColor=BrickColor.new("Deep orange") local fire=Instance.new("Fire",p) fire.Color=Color3.new(0,0,0) fire.SecondaryColor=Color3.new(0,0,0) local sl=Instance.new("SelectionBox",p) sl.Adornee=p sl.Color=BrickColor.new(1003) sl.Visible=true local m=Instance.new("SpecialMesh",p) m.MeshId="http://www.roblox.com/asset/?id=1136139" --http://www.roblox.com/asset/?id=9756362 m.MeshType="FileMesh" local w = Instance.new("Weld", p) w.Part0 = p.Parent.Torso w.Part1 = p w.C0 = CFrame.Angles(0,i/4*math.pi,0) -- How would I CFrame it so that it rotates one angles forward? w.C1 = CFrame.new(0,0,-6) end end tablet() |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 10:02 AM |
How many degrees? 90? 180?
Rotate along the x-axis math.rad(Degrees)
EX: 90 degree rotation = math.rad(90) |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2013 10:03 AM |
| Oh, and you'll need to MULTIPLY the C1 CFrame by CFrame.Angles(math.rad(Degrees),0,0). Do not mess with the C0 CFrame. |
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 10 Mar 2013 10:49 AM |
So would I do this if I wanted it to rotate vertically 45 degrees:
w.C1 = CFrame.new(math.rad(45)) |
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
| |
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
| |
|
|
| 10 Mar 2013 01:57 PM |
Read my post again. You were almost right. |
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 10 Mar 2013 03:11 PM |
| Still don't know howto do it. |
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
| |
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 11 Mar 2013 02:28 PM |
What I have now, but still doesn't work.
function tablet() for i = 1, 8 do local p = Instance.new("Part", workspace.Player1) Instance.new("BodyForce", p).force = Vector3.new(0,0,0) p.Size = Vector3.new(2,2,2) p.BrickColor=BrickColor.new("Toothpaste") local fire=Instance.new("Fire",p) fire.Color=Color3.new(0,0,0) fire.SecondaryColor=Color3.new(0,0,0) local sl=Instance.new("SelectionBox",p) sl.Adornee=p sl.Color=BrickColor.new(1003) sl.Visible=true local m=Instance.new("SpecialMesh",p) m.MeshId="http://www.roblox.com/asset/?id=9756362" --http://www.roblox.com/asset/?id=9756362 m.MeshType="FileMesh" m.Scale=Vector3.new(1.4,1.4,1.4) local w = Instance.new("Weld", p) w.Part0 = p.Parent.Torso w.Part1 = p w.C0 = CFrame.Angles(0,i/4*math.pi,0) --CFrame.Angles(0,i/4*math.pi,0) w.C1 = CFrame.new(Vector3.new(math.rad(800,800,800*math.pi,90))) end end tablet() |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2013 04:29 PM |
At least you tried. You're supposed to MULTIPLY your CFrame.Angles value with the C1 CFrame:
function tablet() for i = 1, 8 do local p = Instance.new("Part", workspace.Player1) Instance.new("BodyForce", p).force = Vector3.new(0,0,0) p.Size = Vector3.new(2,2,2) p.BrickColor=BrickColor.new("Deep orange") local fire=Instance.new("Fire",p) fire.Color=Color3.new(0,0,0) fire.SecondaryColor=Color3.new(0,0,0) local sl=Instance.new("SelectionBox",p) sl.Adornee=p sl.Color=BrickColor.new(1003) sl.Visible=true local m=Instance.new("SpecialMesh",p) m.MeshId="http://www.roblox.com/asset/?id=1136139" --http://www.roblox.com/asset/?id=9756362 m.MeshType="FileMesh" local w = Instance.new("Weld", p) w.Part0 = p.Parent.Torso w.Part1 = p w.C0 = CFrame.Angles(0,i/4*math.pi,0) w.C1 = CFrame.new(0,0,-6)*CFrame.Angles(math.pi/40,0) --- Multiply end end tablet() |
|
|
| Report Abuse |
|
|