|
| 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
|
  |
| Joined: 14 May 2013 |
| Total Posts: 822 |
|
| |
|
|
| 12 Sep 2015 02:48 AM |
| That only works for two parts, I'm looking for it to work for a model. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Sep 2015 03:30 AM |
| model:SetPrimaryPartCFrame(cframe1:lerp(cframe2,t)) |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 12 Sep 2015 03:51 AM |
| t needs to be a number from 0 to 1 |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 03:51 AM |
for example
for i=1, 20 do model:SetPrimaryPartCFrame(cframe1:lerp(cframe2, 0.05)) end
|
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
|
| 12 Sep 2015 04:23 AM |
| then we're both idiots, and on that thought, im heading to bed |
|
|
| Report Abuse |
|
|