How do I tween a Numbersequence?

I want to tween it to transparency 0, how do i do that?

local tween2 = TweenService:Create(game.Workspace.Bomb.Main.Flash1.Transparency, TweenInfo.new(time2), {Transparency = NumberSequence.new(0)})```

Took me 5 mins to search take a look at this post!

Seems like tweenservice doesnt support NumberSequence

local tween2 = TweenService:Create(game.Workspace.Bomb.Main.Flash1, TweenInfo.new(time2), {Transparency = 0})

no NumberSequence needed, and you don’t need to direct to an instance’s property, just the instance itself

Hey! How would I do it with:

game:GetService(ā€œTweenServiceā€):Create(Heat,TweenInfo.new(67.5,Enum.EasingStyle.Linear), {Transparency = 0}):Play()

I get the idea, I am just not sure as to how to implement it for my particleEmitter’s transparency.

You can use a module like this for these type of stuff, it works fine for me

I actually found it, and thanks it helped!

Sadly number sequences are not tweenable, i’d suggest you use your own method or an open source module to tween the number sequence

Here’s a solution. This only works linearly out of the box, but you can ease it by changing the third argument passed to math.lerp, and then probably clamp it.

-- nsa = number sequence array

local nsa = game.Workspace.Bomb:WaitForChild("Main").Flash1.Transparency.Keypoints
local transparentNSA = game.Workspace.Bomb.Main.Flash1.Transparency.Keypoints
for i,v in ipairs(transparentNSA) do
	transparentNSA[i] = NumberSequenceKeypoint.new(v.Time, 1, v.Envelope)
end

local defaultTransparency = game.Workspace.Bomb.Main.Flash1.Transparency.Keypoints

function tweenNSA(turnOff, timeInSec)
	local startValue = game.Workspace.Bomb.Main.Flash1.Transparency.Keypoints
	local endValue = turnOff and transparentNSA or defaultTransparency
	local startTime = os.clock()
	local endTime = startTime + timeInSec
	
	repeat
		for i,v in ipairs(nsa) do
			local transparency = math.lerp(startValue[i].Value, endValue[i].Value, (os.clock()-startTime)/timeInSec)
			nsa[i] = NumberSequenceKeypoint.new(v.Time, transparency, v.Envelope)
		end
		game.Workspace.Bomb.Main.Flash1.Transparency = NumberSequence.new(nsa)
		task.wait(0.01)
	until os.clock() >= endTime
	
	game.Workspace.Bomb.Main.Flash1.Transparency = NumberSequence.new(endValue)
end

Implemented ingame: (see this, because the above code only works for the implementation below and needs to be edited to properly work)
TweenNSA.rbxl (62.6 KB)

BoatTween when it is not mentioned: :neutral_face: