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: im horrible at math

Previous Thread :: Next Thread 
Isosta is not online. 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
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
07 Jul 2016 06:48 PM
replace
obj.Transparency = 0
with
obj.Transparency = transparency
?


mom wheres the spaghetti | R$19,427
Report Abuse
Isosta is not online. 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
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
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
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