|
| 19 Mar 2014 12:29 PM |
I built a diamond-like shape. How would I rotate it?
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:30 PM |
| If it's a model just choose the rotate tool in the toolbar... |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Mar 2014 12:32 PM |
I need it to automatically rotate in-game.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:33 PM |
What can't you use the rotate tool to rotate things..?
Big surprise if you can't |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:35 PM |
I can use the rotate tool. I rotate things all the time in studio. I need it to spin while I'm not there. In a server. In-game. Without me doing anything. You know what I mean? A script that makes a model spin forever.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:36 PM |
@Extreme, you're a dumbass.
@OP, found this on another forum post. Maybe it'll work maybe it won't.
rotation=true parts=workspace.Model1:GetChildren() for i=1,#parts do if parts[i]:IsA("BasePart") then parts[i].CFrame=parts[i].CFrame+Vector3.new(0,0,0) if rotation==true then parts[i].CFrame=CFrame.fromEulerAnglesXYZ(0,0,0) * parts[i].CFrame else end end end
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:41 PM |
@Verified, it had no effect. Thanks for the attempt, though.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
| |
|
UnStunned
|
  |
| Joined: 14 Jun 2012 |
| Total Posts: 122 |
|
|
| 19 Mar 2014 12:49 PM |
You can't rotate models Models do not have CFrame,rotation,size properties. |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:51 PM |
I know that they don't have those properties, so I figured there'd be a script that moves all of the children around a certain point. Which sounds pretty challenging to make.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 19 Mar 2014 12:57 PM |
| just use :moveTo() if ur moving it in a diff position lol |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 12:59 PM |
I'm not, but thanks for the attempt.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
jrf2112
|
  |
| Joined: 29 Jun 2008 |
| Total Posts: 3354 |
|
|
| 19 Mar 2014 01:06 PM |
function rotateMod(mod,center,rotation) local parts ={} local function scan(parent) for _,obj in pairs(parent:GetChildren()) do if (obj:IsA("BasePart")) then table.insert(parts,obj) end scan(obj) end end scan(mod) for _,part in pairs(parts) do part.CFrame = (center*rotation*(center:inverse()*part.CFrame)) -- Credit to oysi93 for this equation thing end end
--[[
rotateMod(mod Model, center CFrame, rotation CFrame)
Example: rotateMod(model, model:GetModelCFrame(), CFrame.Angles(0,math.rad(2),0)
Example:
local mod = game.Workspace.MODEL local step = 1 for i = 0,360,step do rotateMod(mod,mod:GetModelCFrame(),CFrame.Angles(0,math.rad(step),0)) wait() end
]] |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 01:15 PM |
@Jrf, it works! Now I just have to do is make it rotate the correct way...
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 01:17 PM |
Took no time at all to make it rotate correctly. Thanks!
Outfoxing Foxes |
|
|
| Report Abuse |
|
|