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

How do I make items that pass through a part have a particle emitter to the item?

Asked by
gow157 0
7 years ago
Edited 7 years ago

I also need to know if you can change the color of the particle effect within the script

here is the script that I'm currently using for a mesh upgrader:

meshUpgrade = true

meshID = "http://www.roblox.com/asset?id=160003363"

textureID = "http://www.roblox.com/asset/?id=160003344"

script.Parent.Upgrader.Touched:connect (function(Part)

if Part:FindFirstChild("Cash") then

    Part.Cash.Value = Part.Cash.Value + 5

    if meshUpgrade == true then

        for i,v in pairs(Part:GetChildren())do
            if v:IsA("SpecialMesh") then
                v:remove()
            end
        end

        local m = Instance.new("SpecialMesh",Part)
        m.MeshId = meshID
        m.TextureId = textureID
    end
end

end)

0
Move the end) AdvancedCode 136 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Alright, lets say you just want to change the color of a part. You would do Cash.BrickColor = BrickColor.new("White") after you define what Cash is. Since a ParticleEmitter has a color sequence, you would do the following.

Cash = ColorSequence.new(Color3.new(),Color3.new())
Cash.Start = color3 and Color.End = color3

If you use both parameters the first Color3 will be Start and the second will be End, if you just use one it will be both Start and End. Here are some links to assist!

ParticleEmitter

Color3

With these links I think you would be able to figure something out! Hope this helps!

0
This answered your second question because I don't understand your first. AdvancedCode 136 — 7y
Ad

Answer this question