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
 

Model Cframe

Previous Thread :: Next Thread 
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
15 Aug 2011 05:14 PM
Ex,

m=game.Workspace.Part

for i=1,100 do
m.CFrame=CFrame.new(i, .9, 0)
wait()

end

That gets the Part to move 100 studs, correct? What if your trying to move a whole model? Will you need a script like the one above for each part? I know Model's don't have a CFrame property, so what do I do?
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
15 Aug 2011 05:25 PM
a) CFrame each part.
b) Use welds and move the "main" part.
Report Abuse
Xsitsu is not online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
15 Aug 2011 05:26 PM
You can use MoveTo() on models, it works just like setting their position. If there's a part there then the model will be forced to stack on top of it.

m = game.Workspace.Model

for i = 1, 100 do
m:MoveTo(i, 0.9, 0)
wait()
end
Report Abuse
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
15 Aug 2011 05:27 PM
I like B much better. Thank you. It would be a lot less work then scripting eight hundred parts with twenty lines of script. Thanks again
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
15 Aug 2011 05:27 PM
That wouldn't CFrame (if I'm not mistaken)
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
15 Aug 2011 05:34 PM
Yes, MoveTo() works, but when you want to ROTATE a model, you have to use Dark's idea.
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
15 Aug 2011 05:35 PM
Model:TranslateBy(Vector3)
Also works to move the model.
Report Abuse
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
15 Aug 2011 05:50 PM
If you've ever played Boopbots 'Champions of Roblox' you'd know thats what i'm talking about. He has little men walking on the sidewalks, and cars driving on the road. I need to rotate for the turns, but otherwise, all I need to do is make it go forward.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
15 Aug 2011 05:52 PM
Use a for loop to get all the parts them move them.
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