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 » Scripters
Home Search
 

Re: How do you rotate a model using a script?

Previous Thread :: Next Thread 
powerfultyphlosion is not online. powerfultyphlosion
Joined: 05 Jul 2012
Total Posts: 379
11 Apr 2016 08:58 PM
Basically title.
Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 09:12 PM
You mean like this?


script.Parent.Parent.Parent.Test.Conveyor.CFrame = script.Parent.Parent.Parent.Test.Conveyor.CFrame * CFrame.fromEulerAnglesXYZ (math.rad(-180), math.rad(0), math.rad(-180))

basically changes the rotation of an object.


Report Abuse
powerfultyphlosion is not online. powerfultyphlosion
Joined: 05 Jul 2012
Total Posts: 379
11 Apr 2016 09:42 PM
That only works with parts

I tried this:

clone:GetModelCFrame(clone:GetModelCFrame() * CFrame.fromEulerAnglesXYZ (math.rad(90), math.rad(0), math.rad(90)))


but that doesnt make the model rotate either for some reason.
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
11 Apr 2016 09:43 PM
Anaminus made something that will do the job.
Report Abuse
powerfultyphlosion is not online. powerfultyphlosion
Joined: 05 Jul 2012
Total Posts: 379
11 Apr 2016 09:45 PM
Yeah but I need it to work for models
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
11 Apr 2016 09:46 PM
I don't take total credit for this...

local function TransformModel(model, newCFrame)
model:SetPrimaryPartCFrame(newCFrame)
end
local model = selectedpart
local rotatedCFrame = model:GetPrimaryPartCFrame() * CFrame.Angles(0, math.rad(45), 0)
TransformModel(model, rotatedCFrame)

This will rotate a model, just change selectedpart to your own model.

u sicko!
Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 10:10 PM
@Klinky
I never understand, why people don't convert it to degrees themselves, instead of doing math.rad

Maybe it's just me? (sarcasm)


Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
11 Apr 2016 10:11 PM
math.rad makes it easier to see how much when looking at the code later
Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 10:15 PM
@dave2011

not sure if you are going with my joke, or just don't seeéunderstand it?

also who looks at their code later? You code something and never look at it AGAIN!!!!!!.







Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 10:16 PM
see/understand****





Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 10:17 PM
OMG DAVE2011, cmon man I thought you were a good person, but I looked at that game you made, called cabin families, and I'm like really? why man, why would you do this to me? I thought you were a person.


Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
11 Apr 2016 10:19 PM
I still dont understand your joke, and that is all free model garbage for free ODer money, if you dont think im an actual scripter look here:

http://www.roblox.com/games/387308738/Primary-Beta

and here

http://www.roblox.com/games/396806145/Factario-Template
Report Abuse
Entelicon is not online. Entelicon
Joined: 06 Nov 2012
Total Posts: 1002
11 Apr 2016 10:21 PM
Well parts to PrimaryPart

model:SetPrimaryPartCFrame()

That should do the trick.
Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 10:27 PM
@dave2011

Lets team up


Report Abuse
arshiaslaya is not online. arshiaslaya
Joined: 04 Nov 2012
Total Posts: 2670
11 Apr 2016 10:28 PM
@dave2011

Please add me, I will be waiting for you.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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