|
| 05 Jul 2016 06:15 AM |
so i made a very small script that moves a object to another place the problem is that its go from point a directly t point b so how cn i make it go smooth.
script: ------------------------------------------------------------------------------------------ game.Workspace.Ship:SetPrimaryPartCFrame(CFrame.new(0,10,0)*CFrame.Angles(0,0,0)) wait(5) game.Workspace.Ship:SetPrimaryPartCFrame(CFrame.new(0,0,10)*CFrame.Angles(0,0,0)) |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 06:17 AM |
local initial = CFrame.new(0, 10, 0) local final = CFrame.new(0, 0, 10) local ship = game.Workspace.Ship
for alpha = 0, 100, 1 do ship:SetPrimaryPartCFrame(initial:lerp(final, alpha/10)) wait() end
something like that? |
|
|
| Report Abuse |
|
|
daireb
|
  |
| Joined: 16 Nov 2012 |
| Total Posts: 726 |
|
|
| 05 Jul 2016 06:39 AM |
| ^ that but it should be alpha/100 |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jul 2016 07:15 AM |
| yes thats what i need but how to change the speed |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 07:27 AM |
To increase the speed, just change the step of the numerical for loop into a higher number:
for alpha = 0, 100, 5 do -- 5x faster as before now |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 05 Jul 2016 07:47 AM |
| what do you want the end rotation to be? just 90 degrees around the y axis? |
|
|
| Report Abuse |
|
|
|
| 05 Jul 2016 07:48 AM |
| i just want rotate it right and other times left and i wanna be able to edit the grades |
|
|
| Report Abuse |
|
|