|
| 17 Jul 2011 05:36 PM |
| I've tried :MoveTo, but it doesn't work and it doesn't use CFrame. Any ideas of a CFrame algorithm to do this? |
|
|
| Report Abuse |
|
|
OBF
|
  |
| Joined: 29 Sep 2009 |
| Total Posts: 10709 |
|
|
| 17 Jul 2011 05:43 PM |
| Move the part under the model? |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2011 05:44 PM |
| No, I want to move the model over the part. |
|
|
| Report Abuse |
|
|
OBF
|
  |
| Joined: 29 Sep 2009 |
| Total Posts: 10709 |
|
|
| 17 Jul 2011 05:45 PM |
| What's the situation? As in, why do you need to do that? |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2011 05:49 PM |
| use the GetCFrameFromModel().p method. |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2011 05:49 PM |
I have a model full of "Plants". I have a script that puts the model over the part and then CFrames them into the ground. Over time it grows(CFrames up).
I have this, and it doesn't work correctly:
nPlant = game.PlantModels:FindFirstChild(Plant.Value):clone() PlantStuff = nPlant:GetChildren() for i = 1, #PlantStuff do PlantStuff[i].Parent = PlantParts end nPlant:Remove() PlantParts:MoveTo(script.Parent.Plot.Position) DoCFrameY(PlantParts, PlantParts.Tallest.Position.Y)
--DoCFrameY is a function stated in the script |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2011 05:50 PM |
@DingDong272
Can I see an example of it? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 17 Jul 2011 06:04 PM |
| [model]:MoveTo(GetModelCFrame().p) |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2011 06:06 PM |
Wait, you've confused me... What does that do. By my script snip-it, you should see what I want to do.
BTW: http://wiki.roblox.com/index.php/Special:Search?search=GetCFrameFromModel%28%29.p&go=Go |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 17 Jul 2011 07:10 PM |
That's the model CFrame. So, just put your part in a model, and do this:
myModel = ModelThatIWantToMoveAboveMyOtherModel otherModel = modelThatIWillKeepInPlace
myModel.CFrame = otherModel:GetModelCFrame() |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Jul 2011 04:10 PM |
Mon Jul 18 17:09:58 2011 - CFrame is not a valid member of Model
|
|
|
| Report Abuse |
|
|
|
| 18 Jul 2011 05:04 PM |
| Oh, use myModel:MoveTo(otherModel:GetModelCFrame().p) |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2011 04:59 PM |
| It still doesn't work the way I want it to... |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2011 05:00 PM |
| http://www.roblox.com/Broken-Model-item?id=56763817 |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jul 2011 05:13 PM |
| I took your model and it works like I said it would. It takes the french fry lookin stuff and puts it under the brown square. It's *slightly* off-center but that could be fixed with some CFrame magic. |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2011 05:15 PM |
| I don't want to use "CFrame magic". I want it to work O.e |
|
|
| Report Abuse |
|
|
wuppii
|
  |
| Joined: 20 Feb 2010 |
| Total Posts: 1625 |
|
|
| 19 Jul 2011 05:15 PM |
So you wanna let a ' plant' grow? how many parts? |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2011 05:17 PM |
| The simple plant, wheat, has twelve parts.. |
|
|
| Report Abuse |
|
|