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: How to rotate a model around an object?

Previous Thread :: Next Thread 
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
15 Oct 2014 11:34 PM
How would you do this? Like in a hair claw how the claw rotates around the center.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Oct 2014 12:10 AM
You can set the PrimaryPart of the Model and use the SetPrimaryPartCFrame method. So:

for angle = 1, 360 do
model:SetPrimaryPartCFrame(CFrame.new(part.Position) * CFrame.Angles(0, math.rad(angle), 0) * CFrame.new(0, 0, 15));
wait()
end

something like that
Report Abuse
Egzekiel is online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
16 Oct 2014 01:47 AM
Or if you re crazy, you can just rotate the first part and weld the other part to it
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
16 Oct 2014 03:42 AM
I don't know how to script welds yet so... how do I weld anchored parts together so that when I would rotate it, it will turn?


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
16 Oct 2014 03:55 AM
Anyone?
I haven't used welds yet so...


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
16 Oct 2014 06:13 AM
well the builders way is to use roblox weld surfaces.. if the parts arent directly connected then use some invisible cantcollide parts.. not sure though how to make anchored parts turn ??
Report Abuse
devTools is online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
16 Oct 2014 06:29 AM
See, I need it to be able to turn anchored parts because the parts are all cframed, so if it didn't work with anchored then the unanchored cframed parts would fall apart.

Could I possibly make welds between the parts in the model and then unanchor it and the welds (with the script) would hold it together while they're unanchored and moving?


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
spottedkit1999 is not online. spottedkit1999
Joined: 06 Dec 2011
Total Posts: 119
16 Oct 2014 07:06 AM
Anchored only makes it so parts will not move on their own. You can still change their rotation and position while they are anchored through script or Studio tools.
Report Abuse
Egzekiel is online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
17 Oct 2014 01:52 AM
So if i dont say something wrong, here is how you can weld:
p=Instance.new("Weld")
p.Parent=the part you want to be rotated
p.Part0=part you want to be rotated
p.Part1=part that rotate around part0
p.C1=CFraming part1 around part0

There, just have to replace ;)
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