th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 05 Mar 2013 05:47 PM |
No one seems to be able to help me with this. Does anyone know how to make a brick go around in a 360 degree circle around a brick/object in the middle (preferably using CFrame). |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 05:53 PM |
http://wiki.roblox.com/index.php/Circle
-[MassiveGman |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 05 Mar 2013 06:11 PM |
Yes, but the circle is going in the wrong direction. It is going up and down, not side to side :| Script:
while true do for angle = 1, 360 do p = script.Parent p.CFrame = CFrame.new(0, 120, 0) * CFrame.Angles(math.rad(angle), 0, 0) * CFrame.new(0, 0, 100) wait() end end |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
| |
|
iLikePHP
|
  |
| Joined: 24 Feb 2013 |
| Total Posts: 372 |
|
|
| 05 Mar 2013 06:13 PM |
I believe changing the 120 to 0 and the first 0 to 120 will work! Try this: while wait() do for angle = 1, 360 do p = script.Parent p.CFrame = CFrame.new(120, 0, 0) * CFrame.Angles(0, 0, math.rad(angle)) * CFrame.new(0, 100, 0) end end { iLikePHP("official"); } |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 06:14 PM |
* CFrame.Angles(0, math.rad(angle), 0)
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
| |
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
| |
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 05 Mar 2013 06:18 PM |
Thanks! @knightmare
PS: How do you change the speed :|? |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 06:20 PM |
The wait() at the bottom.
¤ ¤ † K M <( •д• )> X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 06:20 PM |
| for angle = 1, 360, #ofincrement do |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 05 Mar 2013 06:55 PM |
Thanks for all the help.. but I have one last request. I want the part, 'p', to begin rotating on it's current CFrame and not get moved to a new CFrame. Here's the script I currently have:
while true do for angle = 1, 360 do p = script.Parent p.CFrame = game.Workspace.Part * CFrame.Angles(0, math.rad(angle), 0) * CFrame.new(0, 0, 10) wait() end end |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
| |
|
|
| 05 Mar 2013 07:05 PM |
p.CFrame = p.CFrame*CFrame.new(0,0,0)
-[MassiveGman] |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 07:06 PM |
scratch that
-[MassiveGman] |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 07:06 PM |
p.CFrame = game.Workspace.Part to p.CFrame = p.CFrame |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 05 Mar 2013 07:07 PM |
@cody: makes the brick spazz out. |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
|
| 05 Mar 2013 07:09 PM |
?
p.CFrame = p.CFrame * CFrame.new(0, 0, 8) |
|
|
| Report Abuse |
|
|
th3oracle
|
  |
| Joined: 23 Feb 2013 |
| Total Posts: 448 |
|
| |
|
|
| 05 Mar 2013 07:18 PM |
Try putting this at the very beginning:
local cframe = p.CFrame
And then have:
p.CFrame = cframe |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2013 07:32 PM |
Or try x = p.Position.X y = p.Position.Y z = p.Position.Z
And use the x y z variables in the arguments of the CFrame |
|
|
| Report Abuse |
|
|