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

Entered a Valid Number for Transparency (1), got told Number Sequence?

Error Code: 04:13:18.041 - Players.Avinychus_RD.PlayerGui.Loading.low.LocalScript:10: bad argument #3 to 'Transparency' (NumberSequence expected, got number)

Code:

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.lowselected.Visible = false
	script.Parent.Parent.highselected.Visible = true
	game.Lighting.SunRays.Enabled = true
	game.Lighting.Blur.Enabled = true
	game.Lighting.Bloom.Enabled = true
	game.Lighting.ColorCorrection.Enabled = true
	workspace.Grass.Patch1.Transparency = 0
	workspace.Grass.Start1.Transparency = 0
	workspace.Grass.Patch1.ParticleEmitter.Transparency = 0
	workspace.Grass.Start1.ParticleEmitter.Transparency = 0
end)

1 answer

✓ Accepted answer

ParticleEmitter's transparency takes a NumberSequence, not a number. They range from 0 to 1.

An example of this would be:

particle.Transparency = NumberSequence.new(0,1)

that will make the transparency start at 0 and end at 1.

If you want to set the transparency to 0 do

NumberSequence.new(0,0)

2 comments

0

I thought NumberSequence.new took an array of NumberSequenceKeypoints? Or is that the case only for when someone wants to specify the time for a value as well?

0

Only when you want to specify the time as well, for his case this will work well enough.

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