|
| 25 Jul 2013 05:14 AM |
im still confused CFrames and everything.
can someone give me a bit of code that would rotate a model and explain how it works? |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 25 Jul 2013 05:20 AM |
| http://wiki.roblox.com/index.php/CFraming |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 06:52 AM |
while true do for _, part in next,script.Parent.Parent:GetChildren() do part.CFrame=part.CFrame*CFrame.new(0,0,0)*CFrame.Angles(math.rad(10),math.rad(10),math.rad(10)) end wait(0.1) end
so i made this and it rotates each part of the model and not the model itself
help please. |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jul 2013 08:19 AM |
--By xXxMoNkEyMaNxXx local function get(t,i) return t[i] end local function set(t,i,v) t[i]=v end local function MulCFrame(obj,cf) local hasCFrame,CFrame=pcall(get,obj,"CFrame") if hasCFrame then pcall(set,obj,"CFrame",cf*CFrame) end for _,child in next,obj:GetChildren() do MulCFrame(child,cf) end end function SetModelCFrame(model,CFrame) MulCFrame(model,CFrame*model:GetModelCFrame():inverse()) end
|
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 09:08 AM |
its fine i used anaminus' code for this ( not written by him but still )
ty anyway |
|
|
| Report Abuse |
|
|