How do i make a dropper and furnace which works? I have been trying and trying but i can't seem to script it correctly.
✓ ANSWER ACCEPTED
How do i script and dropper and a furnace which works in a normal tycoon games?
1 answer
✓ Accepted answer
You actually have to show parts of your code, but because this is really easy I'll answer it as good as I can.
dropper code
dropper = script.Parent -- put this in the part that will drop the parts
TimeBetweenDrops = 2 -- time between drops
while wait(TimeBetweenDrops) do
gold = Instance.new("Part")
gold.Parent = workspace
gold.Position = dropper.Position - Vector3.new(0,dropper.Size.Y,0) -- makes sure it spawns beneath the dropper
gold.Anchored = false
gold.CanCollide = true
gold.Name = "Gold" -- name
end
Furnace code
furnace = script.Parent
money = 0 -- you can change this to a leaderstats value if you want, (or a global variable) it now prints your money everytime gold hits it)
furnace.Touched:connect(function(hit)
if hit.Name == "Gold" then
money = money + 1 -- if you need leaderstats, change this however you like
print(money)
hit:Destroy() -- destroys the part afterwards
end
end)
Please mark this answer as best answer, I hope this solves the problems you had
2 comments
0
This most likely won't work.
0
lol, I tested it, why wouldn't this work?
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Please post some of your code! (:
how do i link the photos?