Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
bt6k 23
4 years ago

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

Log in to vote
0
Answered by 4 years ago

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
Ad

Answer this question