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

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

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)

1 comment

0

Move the end)

1 answer

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!

1 comment

0

This answered your second question because I don't understand your first.

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