local ClickDetector = Instance.new("ClickDetector", script.Parent)
local Drop = script.Parent.Parent.Drop
ClickDetector.MouseClick:connect(function()
Drop.Value = true
end)
local Drop = script.Parent.Parent.Drop
local IronStored = script.Parent.Parent.IronStored
if Drop == true then
if IronStored.Value > 0 then
local IronOre = Instance.new("Part",game.Workspace)
IronOre.Name = "IronOre"
IronOre.Size = Vector3.new(1, 1, 1)
IronOre.TopSurface = 0
IronOre.BottomSurface = 0
local OreValue = Instance.new("NumberValue",game.Workspace.IronOre)
OreValue.Name = "Price"
IronOre.Price.Value = 5
IronStored.Value = ValueStored.Value - 1
Drop = false
end
else
Drop = false
end
Which script is wrong? How do i fix it? its supposed to be storage a storage system for my 'Iron Ore'. Any and all answers are greatly appreciated! Thanks!
-SamKillz123

4 comments
I cannot do that because the first code is a button and the second is the dropper
@SquirrelOnToast
For instance... the ore comes down the conveyor.. touches the little whatever and it is deleted but adds 1 to the 'IronStored' then you push a button and it then drops an ore but also removes 1 from the 'IronStored' value. do you get it?
Not true. By my eye, those 2 scripts can be merged quite easily.