Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Jul 2016 06:45 PM |
This works, but how do i have the final product of the transparency set to the transparency value? (I want it to start at 0, which it does)
local cframeAndTransparencyLerp = function(obj,newCFrame,duration,transparency) local start = obj.CFrame local isCanCollide = obj.CanCollide obj.CanCollide = false for i=1,30*duration do obj.Transparency = 1 - i/(30*duration) obj.CFrame = start:lerp(newCFrame,i/(30*duration)) wait(1/30) end obj.CanCollide = isCanCollide obj.CFrame = newCFrame obj.Transparency = 0 end
- Isosta |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2016 06:48 PM |
replace obj.Transparency = 0 with obj.Transparency = transparency ?
mom wheres the spaghetti | R$19,427 |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Jul 2016 06:55 PM |
ik
im converting this from an old holo script
but for the actual interpolation of the transparency i need final product to be transparency
that line is just a safeguard
- Isosta |
|
|
| Report Abuse |
|
|
|
| 07 Jul 2016 06:59 PM |
replace this i/(30*duration) with (i/(30*duration)) does that change anything?
mom wheres the spaghetti | R$19,427 |
|
|
| Report Abuse |
|
|