Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make an Ore Limit in Zonix's Simple Sandbox Tycoon Kit?

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?

1 answer

✓ Accepted answer

"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

1 comment

1

I will accept your answer even though I fixed it myself :)

This discussion is preserved as it was. New answers, comments, and votes are closed.