Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make Rays fade away from a given transparency to completely transparent?

I have created a firearm for a Western Game I am creating for an A Level project. The firearm works as intended, however I would like to make the shots look a little more stylish, and have the Ray fade from 0.8 Transparency to Completely transparent, in 0.2 seconds. Any advice on how to do this?

1 answer

✓ Accepted answer
local ts = game:GetService("TweenService")
local goal = {}
goal.Transparency = 1
local info = TweenInfo.new(0.2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
local tween = ts:Create(rayPart,info,goal)
tween:Play()

You can also play around with the EasingStyle and EasingDirection for different effects.

This discussion is preserved as it was. New answers, comments, and votes are closed.