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: Circle

Previous Thread :: Next Thread 
th3oracle is not online. 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
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
05 Mar 2013 05:53 PM
http://wiki.roblox.com/index.php/Circle


-[MassiveGman
Report Abuse
th3oracle is not online. 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 is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
05 Mar 2013 06:12 PM
Bump
Report Abuse
iLikePHP is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Mar 2013 06:14 PM
* CFrame.Angles(0, math.rad(angle), 0)


¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
th3oracle is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
05 Mar 2013 06:16 PM
Nope.
Report Abuse
th3oracle is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
05 Mar 2013 06:17 PM
Thanks! @knightmare
Report Abuse
th3oracle is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
05 Mar 2013 06:20 PM
The wait() at the bottom.

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
05 Mar 2013 06:20 PM
for angle = 1, 360, #ofincrement do
Report Abuse
th3oracle is not online. 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 is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
05 Mar 2013 07:00 PM
Bump2
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
05 Mar 2013 07:05 PM
p.CFrame = p.CFrame*CFrame.new(0,0,0)


-[MassiveGman]
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
05 Mar 2013 07:06 PM
scratch that


-[MassiveGman]
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
05 Mar 2013 07:06 PM
p.CFrame = game.Workspace.Part
to
p.CFrame = p.CFrame
Report Abuse
th3oracle is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
05 Mar 2013 07:07 PM
@cody:
makes the brick spazz out.
Report Abuse
th3oracle is not online. 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 is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
05 Mar 2013 07:10 PM
Nope @me.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
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
dog456pop248 is not online. dog456pop248
Joined: 24 Aug 2008
Total Posts: 3977
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
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