generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Revolution of a point

Previous Thread :: Next Thread 
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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 is not online. 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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
21 Mar 2013 06:18 AM
So it will move the Model named "engine" or just the part?
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
21 Mar 2013 03:57 PM
No sir won't work :C
Report Abuse
pwnedu46 is not online. 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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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 is not online. 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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
22 Mar 2013 06:22 AM
Oh.. ok i'll test that when i get home from school
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
23 Mar 2013 11:49 AM
Still won't work
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
26 Mar 2013 08:24 PM
please help guys
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
20 May 2014 05:29 PM
2 years ago bump but still need help
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
22 May 2014 08:09 PM
Anyone?
Report Abuse
InsaneMisfit is not online. InsaneMisfit
Joined: 16 Sep 2011
Total Posts: 8534
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 is not online. 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 is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
22 May 2014 08:13 PM
Oops, put a wait in the for loop
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
25 May 2014 05:13 PM
I removed the wait then re tryed the scripted and it instantly crashed roblox
Report Abuse
cntkillme is not online. 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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
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
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
25 May 2014 05:56 PM
Anyone :D?
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
25 May 2014 09:03 PM
ples :D?
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
25 May 2014 09:06 PM
Hm,
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
25 May 2014 11:59 PM
XD lol just a hm
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
28 May 2014 08:16 PM
anyone plex :D?
Report Abuse
TreeLineUser is not online. TreeLineUser
Joined: 17 Mar 2013
Total Posts: 1659
28 May 2014 11:41 PM
Anyone please?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image