|
| 20 Mar 2013 08:13 PM |
| I'm trying to figure out a way to have a block named "Engine" be circling around the middle point name "center" in a 400 stud diameter so i need some help.... |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 20 Mar 2013 10:02 PM |
Try this:
local engine = Workspace.Model.Engine local center = Workspace.Model.Center
local ctr = ctr.Position local diam = 400
while true do for i = 0, 360, 0.5 do local t = math.rad(i) engine.Position = ctr + Vector3.new(diam*math.sin(t), 0, diam*math.cos(t)) wait(0.1) end end |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2013 06:18 AM |
| So it will move the Model named "engine" or just the part? |
|
|
| Report Abuse |
|
|
| |
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 21 Mar 2013 04:01 PM |
Oh, if engine is a model then use this
local engine = Workspace.Model.Engine local center = Workspace.Model.Center
local ctr = ctr.Position local diam = 400
while true do for i = 0, 360, 0.5 do local t = math.rad(i) engine:MoveTo(ctr + Vector3.new(diam*math.sin(t), 0, diam*math.cos(t))) wait(0.1) end end
|
|
|
| Report Abuse |
|
|
|
| 21 Mar 2013 09:40 PM |
| could you please make a model representing this? so far it has not worked am i doing something wrong? |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 21 Mar 2013 10:27 PM |
| Make sure that all the parts in the Engine model are anchored. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2013 06:22 AM |
| Oh.. ok i'll test that when i get home from school |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 20 May 2014 05:29 PM |
| 2 years ago bump but still need help |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 May 2014 08:10 PM |
Take the ac-130 in my models (The one I published)
There's a script that does exactly what you want with simple and clear Instructions. Enjoy.
Life is just a word, but you bring the definition to it. - Eminem |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 May 2014 08:13 PM |
local engine = Game.Workspace.Model.Engine; local center = Game.Workspace.Model.Center; local origin = center.Position; local radius = 400;
while true do wait(0.1) for x = math.pi/180, 2 * math.pi, math.pi/180 do engine.CFrame = CFrame.new(origin) * CFrame.Angles(0, x, 0) * CFrame.new(0, 0, radius); end end |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 May 2014 08:13 PM |
| Oops, put a wait in the for loop |
|
|
| Report Abuse |
|
|
|
| 25 May 2014 05:13 PM |
| I removed the wait then re tryed the scripted and it instantly crashed roblox |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 25 May 2014 05:20 PM |
| I said put it in the for loop, not remove it |
|
|
| Report Abuse |
|
|
|
| 25 May 2014 05:22 PM |
| Oh... thought you said oops you put in the for loop so i decided to remove it xd... |
|
|
| Report Abuse |
|
|
|
| 25 May 2014 05:30 PM |
| Still wont work it puts the Engine 400 studs away from the center but it does not move and whenever the engine gets moved by me manually with the move tool it teleports back to that spot. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
L0cky2013
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 1446 |
|
| |
|
| |
|
| |
|
| |
|