So i have a furnace for my tycoon -- it works in the sense that it destroys the ores and adds money however the issue comes when i attempt to use 2 different 'droppers'
(just a side note i have 2 droppers, 1 drops an ore Named ore1 and the other ore2
if ore2 goes into the furnace before ore1 ore1 is 'processed' by the furnace and gets destroyed and gives the player money
- i would like them to both separately go into the furnace excuse the messy code : P
Furnace Code
function onTouch(hit)
if hit.Parent:FindFirstChild("ore1") then
local Part1 = game.Workspace:FindFirstChild("ore1")
local ore1Value = 25
Part1:Destroy()
game.Workspace["Tycoon 1"].DropperMoney.Value = game.Workspace["Tycoon 1"].DropperMoney.Value + ore1Value
else
if hit.Parent:FindFirstChild("ore2") then
local Part2 = game.Workspace:FindFirstChild("ore2")
local ore2Value = 50
Part2:Destroy()
game.Workspace["Tycoon 1"].DropperMoney.Value = game.Workspace["Tycoon 1"].DropperMoney.Value + ore2Value
end
end
end
script.Parent.Touched:Connect(onTouch)
if there is any code you need me to add please tell me (:

6 comments
Aren't they supposed to be destroyed? Isn't that the point of a furnace in a dropper tycoon?
hmm lemme try n' explain so ore1 is at the start of the conveyor and ore2 is at the furnace, when ore2 is destroyed the same happens to ore1 while it's at the start of the conveyor
Ah. You can change the names of the ores if they both have the same name.
i have 2 droppers 1 drops an ore Named ore1 and the other ore2
doesn't it need to be "elseif"? not else and then if
the 1st ore still dies