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 » Scripters
Home Search
 

Re: Lerping a model with SetPrimaryPartCFrame()?

Previous Thread :: Next Thread 
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 02:27 AM
I've tried a lot, but I can't figure it out.

How do I lerp a model with a PrimaryPart that needs SetPrimaryPartCFrame()? This could pack out handy for others too.

What I'm currently trying to do is moving a 'experimental object' up and down slowly as it's in water. This object is a character but not an NPC.

Quick help appreciated.


~SlopranoDark
Report Abuse
MiniNob is not online. MiniNob
Joined: 14 May 2013
Total Posts: 822
12 Sep 2015 02:39 AM
cframe1:lerp(cframe2,t)
Report Abuse
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 02:48 AM
That only works for two parts, I'm looking for it to work for a model.
Report Abuse
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 03:07 AM
Bump #1
Report Abuse
distalDigitPhalanx is not online. distalDigitPhalanx
Joined: 25 Jan 2015
Total Posts: 1509
12 Sep 2015 03:30 AM
model:SetPrimaryPartCFrame(cframe1:lerp(cframe2,t))
Report Abuse
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 03:37 AM
I've tried that, but it doesn't move... It simply teleports the model's PrimaryPart (along with the model) into cframe1
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Sep 2015 03:51 AM
t needs to be a number from 0 to 1
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Sep 2015 03:51 AM
for example

for i=1, 20 do
model:SetPrimaryPartCFrame(cframe1:lerp(cframe2, 0.05))
end

Report Abuse
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 03:58 AM
I know, I've tried that but the result I get is that it teleports the model, and it doesn't go smoothly from one to the other spot...
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Sep 2015 03:59 AM
did u add a wait
Report Abuse
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 04:01 AM
Yeah, I did, same result.
Report Abuse
SlopranoDark is not online. SlopranoDark
Joined: 01 Jun 2010
Total Posts: 440
12 Sep 2015 04:14 AM
Bump #2
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Sep 2015 04:23 AM
then we're both idiots, and on that thought, im heading to bed
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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