|
| 27 Sep 2012 02:03 PM |
I've tried
game.Workspace.Model.CFrame=CFrame.new(0,0,0)
The model wouldn't budge..
Most likely it has something to do with :GetChildren()..
Also if you could leave a link to were I can learn more about this, that would be nice. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 27 Sep 2012 02:06 PM |
| There is no CFrame property for a model, so yeah, you would have to loop through the children and CFrame them, or just CFrame one part in the model, and make welds between the rest. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 27 Sep 2012 02:07 PM |
| If you just want to move a model though, use game.Workspace.Model:MoveTo(Vector3) |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2012 02:29 PM |
Actualy, you can move a model through CFrame in a very easy way
for _,v in pairs(game.Workspace.ModelHere:GetChildren()) do v.CFrame=CFrame.new(0,0,0) end |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 27 Sep 2012 02:46 PM |
Neither of urs works but this does:
game.Workspace.Model:MoveTo(Vector3.new(0,0,0))---Change model to the model's name.
No problem. |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2012 02:55 PM |
To WATCH it move there, how do I use?:
for i = 0, 100 do
|
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 27 Sep 2012 02:56 PM |
You need to move each part relative (according to) another position. That way they all move/rotate in the same direction.
function ModelCFrame(Model, NewCFrame) Model:MoveTo(NewCFrame.p) local Origins = {} for i,v in pairs( Model:GetChildren() ) do if v:IsA("BasePart") then Origins[v] = Model:GetModelCFrame():toObjectSpace(v.CFrame) end end for i,v in pairs( Origins ) do i.CFrame = NewCFrame:toWorldSpace(v) end end
ModelCFrame(Workspace.Model, CFrame.Angles(1,0,1)) |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2012 02:57 PM |
| Consists of using magnitude and some complex math. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 27 Sep 2012 02:58 PM |
for i = 0,10, 0.1 do--Change the 10 to how far u want to move it game.Workspace.Model:MoveTo(Vector3.new(0,i,0))--When the i is in the middle it will watch-move up, to change it, remove the i, replace i with 0, and place i in another vector. end
|
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 27 Sep 2012 02:59 PM |
targetPos = ? movingPart = ? (or model/what ever) magnitude = (movingPart.Position - targetPos.Position).magnitude
for i = 1, magnitude do
movingPart:MoveTo(movingPart.Pos + (movingPart.Position - targetPos.Position).unit)
end |
|
|
| Report Abuse |
|
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 27 Sep 2012 03:00 PM |
| MrNicNac, that rlly wasnt neccasary, its so long and mine works...why so long? |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
|
| 27 Sep 2012 03:06 PM |
| @Fedora, I just finish trying yours, it didn't work. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 27 Sep 2012 03:30 PM |
| Srry, exactly the second script i was unsure off, because i have done that in bricks, and not models, so my work here is finished, anyone else to help him? |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2012 03:31 PM |
| Not going to put effort into making a script for cyclone.. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 27 Sep 2012 03:39 PM |
"Fedorakid"
Yes it was. Everything in this thread has been the wrong method so far. Mine using relativity to not make those mistakes. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 28 Sep 2012 03:43 AM |
| I still don see why its so long, i have tested mine and it works perfect.. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 28 Sep 2012 03:45 AM |
@eJorge
Yes.U jus agreed with nicnc cuzz his known as a good scripter, but test it before u post it fails.Idiot. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 28 Sep 2012 04:24 AM |
MrNicNac's function actually CFrames the model, MoveTo won't fusion it with other bricks.
And don't PA. You said I fail and that I'm an idiot. |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 28 Sep 2012 04:37 AM |
| MoveTo Also cframes with the bricks, so go test it before u com with ur smart tounge speaking a lie. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 28 Sep 2012 05:02 AM |
Fine, im gona give u instructions:
Goto an sb, say this (if it works, just wrote it.. or else just make urself cuzz u know what im talking about...)
mod = Instance.new("Model",Workspace) mod.Name = "Test"
b = Instance.new("Part",mod) b.Position = Vector3.new(0,10,0) b.Anchored = true b.Size = Vector3.new(5,15)
then say this:
game.Workspace.Test:MoveTo(Vector3.new(10,10,10)) |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 28 Sep 2012 05:03 AM |
| And if that doesent work, IM GONA SHOW U MYSELF!CUZZ IT WORKS PERFECTLY FINE!! |
|
|
| Report Abuse |
|
|