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

how to script a furnace i cant find it and where?

Asked by 6 years ago

i cant find a video or a way to script a working furnace? here is my dropper script

function fire() local p = Instance.new("Part") p.Position = script.Parent.Position p.Size = Vector3.new(1,1,1) p.BrickColor = BrickColor.new("Deep orange") p.BottomSurface = 0 p.TopSurface = 0 p.Name = "TycoonBrick" p.Parent = script.Parent end

while true do wait(2) fire() end

0
if I helped you out please accept my answer. Otherwise comment how I can help you better User#21908 42 — 5y

2 answers

Log in to vote
0
Answered by
gxg 0
6 years ago

You'd use the Touched event. This fires whenever a BasePart comes into contact with another BasePart.

When the event fires, you'll want to Destroy the part.

After all of this, you'll award the player using whatever currency system you have.

Ad
Log in to vote
0
Answered by 6 years ago

Have a value inside the ore thats name is cash. Then have a part that you want to be the furnace at the end of the conveyor or whatever. Then have a script like this inside:

script.Parent.Touched:Connect(function(hit) 
    if hit.Cash then -- checking to see if it is an ore with cash inside it
        --get the tycoon owner and award them the money 
        local money = tycoonOwner.Money -- whatever works for you here
        money.Value = money.Value + Cash.Value -- adds the ores value to the owners money value
        hit:Destroy() -- gets rid of the ore    
    end
end)

Answer this question