of     1   

STAPumaUSA
#139963604Friday, July 11, 2014 6:24 AM GMT

How do I put a limit on a backpack local script. For example my backpack tool only works with my forage tool. And I want it to make a player only have a limit of 20 and then they cant forage until they remove something from the backpack. How would I do that?
2eggnog
#139963702Friday, July 11, 2014 6:25 AM GMT

You're going to need to be more specific.
STAPumaUSA
#139963933Friday, July 11, 2014 6:29 AM GMT

I have two tools that work together. Backpack and forage. I want it so the player can only pick yup 20 objects then no more until they take something from their backpack. The backpack is only a local script too.
2eggnog
#139964168Friday, July 11, 2014 6:33 AM GMT

You could store the table of items in the backpack as a global variable (for example _G.items). Then, in the forage tool, check if #_G.items is less than 20 before picking something up.
STAPumaUSA
#139964284Friday, July 11, 2014 6:35 AM GMT

Could you please give me a example. I am usually good a scripting just this has been confusing me for the past 4 days.

    of     1