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 » Scripting Helpers
Home Search
 

Re: Centering Model over part

Previous Thread :: Next Thread 
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
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 is not online. OBF
Joined: 29 Sep 2009
Total Posts: 10709
17 Jul 2011 05:43 PM
Move the part under the model?
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 05:44 PM
No, I want to move the model over the part.
Report Abuse
OBF is not online. 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
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
17 Jul 2011 05:49 PM
use the GetCFrameFromModel().p method.
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
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
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 05:50 PM
@DingDong272

Can I see an example of it?
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 05:56 PM
Bump
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 06:04 PM
....
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
17 Jul 2011 06:04 PM
[model]:MoveTo(GetModelCFrame().p)
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
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
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 06:12 PM
HELLO!?!?!
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 06:21 PM
-_-
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
17 Jul 2011 06:29 PM
HELP!!!!
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
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
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
18 Jul 2011 04:02 PM
Thanks, I'll try.
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
18 Jul 2011 04:10 PM
Mon Jul 18 17:09:58 2011 - CFrame is not a valid member of Model
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
18 Jul 2011 05:04 PM
Oh, use myModel:MoveTo(otherModel:GetModelCFrame().p)
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
19 Jul 2011 04:59 PM
It still doesn't work the way I want it to...
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
19 Jul 2011 05:00 PM
http://www.roblox.com/Broken-Model-item?id=56763817
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
19 Jul 2011 05:10 PM
Bump
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
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
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
19 Jul 2011 05:15 PM
I don't want to use "CFrame magic". I want it to work O.e
Report Abuse
wuppii is not online. 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
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
19 Jul 2011 05:17 PM
The simple plant, wheat, has twelve parts..
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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