Loot system- help

I’m making a loot system similar to fishtopia. The idea is that if you have ten cash you put it in and it takes it by giving negative cash. But now, if you have $0 it will stay at zero and give you the product regardless. Im also trying to find a way to get a random amount of tickets but when I tried it just gives cash.


IM SO SORRY I DONT GET CODING ITS SO
cCOmMmPliCateeD

yeah, I would help if I knew coding. ( I’m sorry.)

1 Like

email me tho my brother knows coding

Summary

k12addisynk12@outlook.com

one moment

see below comments

What item is the item granter giving?
Because I see that your doing both cash (by taking away 10) but also tickets and that isn’t possible since an item granter can’t give 2 different items so use either a different item granter for the tickets or a different one for the money, (Which is why you are only getting money, since the item granter is set to money.)

So if your doing a different money one just make it take away 10 and broadcast on a channel to activate the granting tickets block code so you still get a random amount of tickets.

Update:
Just as a confirmation there is nothing wrong with your block code, in fact your block code is excellent, it’s actually just that your trying to grant to 2 different item at once using 1 item granter and that isn’t possible.

1 Like

Update

Use a vending machine to first check that the correct amount of cash is available and run the purchase. Then use the item granter block for the block code you have rn, except remove the first “grant player selected item” block

1 Like

Item granter currently gives cash but is -10

Yeah, but your problem is you’re also trying to grant tickets using the item granter that is giving cash so all you’re getting is cash, that is why you have to use another item granter that gives you tickets.

1 Like

Make a checker that runs before this is activated. Have it check for more than 10 cash in your inventory

Make a property that tracks the cash you have. For the part that actually gives the thing, put the entire block code in an if property cash > 10 then.