|
| 17 Mar 2015 05:57 PM |
Its in a module script... val, -- value it changes steps, -- number of steps it takes, smooth/not smooth t, -- time it takes y, -- target value x -- starting value (optional)
-- module function F.WholeLerp(val,steps,t,y,x) local org=x or val for i=1,steps do val=(org+(y-org)*(i/steps)) wait(t/steps) end end
--local script F.WholeLerp(fakeMouse.Rotation,5,.2,0) |
|
|
| Report Abuse |
|
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 17 Mar 2015 05:59 PM |
| You can't reference primitive types, only "copy" them. You need to set fakeMouse's property, it won't update automatically. |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2015 06:00 PM |
| Than how would I accomplish this? |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2015 06:01 PM |
Could I do this?
local stng='Rotation'
item[stng]= 10 |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
| |
|
kert109
|
  |
| Joined: 31 Dec 2009 |
| Total Posts: 681 |
|
|
| 17 Mar 2015 06:29 PM |
| Lerp = Linear Interpolation. |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 17 Mar 2015 06:39 PM |
omg such hard words :O *brain explodes* |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2015 06:47 PM |
| Still want some help here :/ |
|
|
| Report Abuse |
|
|