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

Can tycoon upgraders add effects to dropper blocks?

Im currently creating a tycoon, And Im making a new upgrader "ore flamer" So, I was wondering if its upgrader can like. add a effect such as fire sparkles particles ect.

Heres the code:

­­­­­­­­­­­­­­script.Parent.Upgrader.Touched:connect(function(Part)
	if Part:FindFirstChild("Cash") then
		Part.Cash.Value = Part.Cash.Value + 5
	end
end)

But Im wondering if i can do this:

script.Parent.Upgrader.Touched:connect(function(Part)
	if Part:FindFirstChild("Cash") then
		Part.Cash.Value = Part.Cash.Value + 5
   Add:Sparkles
	end
end)

1 answer

✓ Accepted answer

The code provided above could be accomplished but not through the use of "Add:Sparkles".

script.Parent.Upgrader.Touched:connect(function(Part)
    if Part:FindFirstChild("Cash") then
        Part.Cash.Value = Part.Cash.Value + 5
  		local sparkles = Instance.new("Sparkles", Part)
    end
end)

I modified your code above from "Add:Sparkles" to local sparkles = Instance.new("Sparkles", Part). This line of code creates a "Sparkle" object in the part.

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