I am using this kit > https://devforum.roblox.com/t/simple-sandbox-tycoon-kit/1488280 for a sandbox tycoon game like Miners Haven.
But...! There is no Ore Limit from what I can see. I know how to see how many children are in a folder called 'OreDrops' or something but how would I go about making a script where it stops droppers from dropping if it has reached MAX capacity? I would also like to add a script where you can upgrade it with money, etc. How would I do this and if you want to fix my code or something here you go:
local drops = game.Workspace.Plots.Plot1.MiscInfo.OresDropped:GetChildren() local number = #children print(number)
This should print a number of how many children, so how do I use that for a OreLimit?
"children" isn't defined. I am assuming you meant to put
local number = #drops
In the script that does the dropping, you could put the code mentioned above, and add this:
if #drops < MaxDrops then --Set MaxDrops to be whatever you want the maximum amount of drops to be --put the dropping script here end