How do you make it so that you have a certain chance of getting something?

So like in my game if you get a certain item you can auction it off but I want to make it so that there are multiple of you getting some bad amount of cash and some good amount of cash.

Sorry, I don’t understand, what do you want?

1 Like

Using block code you could get a variable and set it to a 1 in (insert chance here).
here is an example for your scenario, @Ghassan :
Screenshot 2024-06-07 12.58.43 PM
this works by first checking if a 1 in 5 chance has been made. If it has, it gives you a small amount of money. Then it checks if you made a 1 in 10 chance. If it has, it will provide you with a large amount of money. If neither of the chances are made you will get the normal amount of money

3 Likes

greenbean7’s works, but there are chances of nothing happening if either randomizer doesn’t hit one, so just use this, or this guide.

1 Like

there are randomizer guides on the forums, remember to search before you post.
and also a lottery ticket guide

what do you mean? there is an else prompt that gives the player a normal amount of money.

2 Likes

But randomizers can be way simplified.
Set random to random integer 1 to 10
Broadcast message on channel create text with random

The random integer is 1-5, so if the randomizer doesn’t land on five, then nothing happens, so there’s a one-in-five chance that nothing happens.

Do you know what an else statement is?

2 Likes

Aight didn’t see that. Sorry about that. Well, then it works.

3 Likes