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: MODEL MOVING ON IT'S OWN:Cframe Maybe?

Previous Thread :: Next Thread 
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
18 Jul 2012 11:02 PM
Hey people! my question is how do i make a model move in its own from one position to another randomly generated array of positions. I'm ok at scripting, so i am not asking for a whole script. Just somthing that will help me on my way.

Thx for the support!
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
18 Jul 2012 11:03 PM
Go to the roblox wiki and look up `MoveTo` and `TranslateBy`
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
18 Jul 2012 11:03 PM
Go to the roblox wiki and look up `MoveTo` and `TranslateBy`
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
18 Jul 2012 11:04 PM
Model:MoveTo(Vector3.new(0,0,0))
It moves the entire model to the position, but doesn't CFrame it so if you have parts already at 0,0,0, the model will be put on top of them.
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
18 Jul 2012 11:05 PM
thanks, but what if i said i need the model to glide thier....
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
18 Jul 2012 11:06 PM
Look up Lerp in the wiki.
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
18 Jul 2012 11:07 PM
Also if you don't want it to move out of the way of other parts but move through them, use TranslateBy.
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
18 Jul 2012 11:26 PM
The TranslateBy and MoveTo advise was helpful, but lerp made no sense. I still do not know how to glide objects like the creator of "the little men" did
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
18 Jul 2012 11:29 PM
Try to make your own three dimensional tweening function then :D
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
18 Jul 2012 11:32 PM
    Vector3:Lerp(Vector3,alpha)

this returns a vector3 that is alpha between the other two given. AKA if I was to do

    a:Lerp(b,0.5)

that would give a vector halfway between a and b. So if you wanted to make it move smoothly between point a and point b you would do something like

    for i=0,1,0.01 do
        Wait();
        model:MoveTo(start:Lerp(end,i));
    end
Report Abuse
TimeworksX is not online. TimeworksX
Joined: 14 Feb 2011
Total Posts: 421
19 Jul 2012 10:54 AM
bump (just for more advise)
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