sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 05:52 PM |
How would you make an object orbit around another object? Like an atom, the electrons going around the nucleus, or a moon orbiting earth.
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 05:54 PM |
| I think CFrame would be the best way to do it. |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 05:54 PM |
| CFrame? CFrame the position of the object constantly, can't think of any other way right now. |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 05:55 PM |
| Ya that or just put a motor on top of the motionless brick and put an invisible stick on it with the moving object welded to the end. |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 05:55 PM |
i know, but how would would i cframe it? What i am trying to do is get a sphere to cframe around a character, so it just looks plain awesome. Anyone have any ideas, as to how to do this?
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 06:02 PM |
umm you could do something like this
wait(.1) sphere.CFrame = Vector3.new(2,0,0) wait(.1) sphere.CFrame = Vector3.new(1.9,0,.1) wait(.1) ect.
thats like the worst and longest and most inefficient way to do that. |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 06:08 PM |
im thinking something along the lines of random angles, with an i= loop. Idk the coding tho
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 06:55 PM |
This is what i have so far:
X = script.Parent.Parent.Torso.Position.X Y = script.Parent.Parent.Torso.Position.Y Z = script.Parent.Parent.Torso.Position.Z sphere = script.Parent sphere.CFrame.new() i=0 while true do wait(.1) sphere.Position = v.Position + Vector3.new(i,i,0) wait(.2) i = i + .5 end
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 06:58 PM |
It keeps saying new is not a valid member
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
Sadcamp
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 21729 |
|
|
| 28 Sep 2011 07:03 PM |
| Did you forget to add every humanoid that enters the game/Spawns? |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 07:03 PM |
Can someone help me? This is driving me crazy
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 07:04 PM |
@sad i put the sphere with this script into my character. In the output, it keeps saying: Wed Sep 28 16:58:24 2011 - new is not a valid member
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 07:07 PM |
X = script.Parent.Parent.Torso.Position.X Y = script.Parent.Parent.Torso.Position.Y Z = script.Parent.Parent.Torso.Position.Z sphere = script.Parent This line right here> sphere.CFrame.new() i=0 while true do wait(.1) sphere.Position = v.Position + Vector3.new(i,i,0) wait(.2) i = i + .5 end
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 07:11 PM |
radius = 10 number = 100 position = script.Parent.CFrame part = script.Parent while wait() do for i = 1, number do sine = math.sin((360 / number + 360 / number * i) / (180 / math.pi)) cosine = math.cos((360 / number + 360 / number * i) / (180 / math.pi)) part.CFrame = position + Vector3.new(radius * sine, 0, radius * cosine) part.CFrame = part.CFrame*CFrame.fromEulerAnglesXYZ(0, (360 / number + 360 / number * i) / (180 / math.pi), 0) wait(0.01) end end
TigerBloodd | Programmer | Developer |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 07:14 PM |
Use mine, its the most efficient.
TigerBloodd | Programmer | Developer |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 07:21 PM |
it works, except it doesnt move with the player while the player is walking.
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 28 Sep 2011 07:23 PM |
i tried implementing this:
radius = 10 number = 100 position = script.Parent.CFrame part = script.Parent while wait() do for i = 1, number do Position = script.Parent.Parent.Torso.Position sine = math.sin((360 / number + 360 / number * i) / (180 / math.pi)) cosine = math.cos((360 / number + 360 / number * i) / (180 / math.pi)) part.CFrame = position + Vector3.new(radius * sine, 0, radius * cosine) part.CFrame = part.CFrame*CFrame.fromEulerAnglesXYZ(0, (360 / number + 360 / number * i) / (180 / math.pi), 0) wait(0.01) end end
so that it would move with the player while walking. No luck there...
~I Will kill for you until i finally kill you~ Sayhisam1 |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2014 11:45 AM |
| Try using BodyPosition and that stuff. |
|
|
| Report Abuse |
|
|
Sadcamp
|
  |
| Joined: 05 Nov 2010 |
| Total Posts: 21729 |
|
|
| 09 Jun 2014 03:44 PM |
@boomb
you're three years late.
screw it, i'm a penguin. i love c&g's faces. |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 09 Jun 2014 03:46 PM |
wtf
speed=3; for i=1,360 do some_part.CFrame=some_part.CFrame*CFrame.new(0,math.rad(i)*speed,0)*CFrame.Angles(0,0,0);wait(.125)end; |
|
|
| Report Abuse |
|
|