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

Number sequence error when I try to make the Particle emitter go invis?

Somethings wrong with my script, I don't know..

local UserInputService = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local charname = char.Name


if plr.Team == game.Teams.ISD then
	UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		local cloneSmoke = game.Lighting.Smoke:Clone()
		cloneSmoke.Parent = char.UpperTorso
		wait(1)
		char.UpperTorso.Smoke.Transparency = 1
		
	end
end)
end

It is giving me the error...

Workspace.bt6k.LocalScript:13: bad argument #3 (NumberSequence expected, got number)

1 answer

✓ Accepted answer

Wrong type of value. You have to use the table NumberSequence to change a property. Refer to https://developer.roblox.com/en-us/articles/Particle-Emitters . Sample:

local a = Instance.new("Part")
a.Parent = workspace
local b = Instance.new("ParticleEmitter",a)
b.Transparency = NumberSequence.new(1) --note: this makes the particles invisible

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