When I was looking around the forums, there was many code options, but no 4-digit codes, so I went ahead and made one!
What is a 4-digit code?
A 4-digit code is a code that many locks use. Think of it like a “bike lock” so that no one will steal your bike, or an escape room code, so that you won’t be able to progress further until you know the code.
What you can use with codes.
With codes, you can use many things! In real life, they are used so that people won’t get into stuff, or just for a fun game! While you are making this (If you are going to make this), think of what you could use it for.
How to make a 4-digit code
Resources:
What will you need for this? You will need:
4 Properties,
4 Counters,
4 Triggers or Buttons,
1 Checker.
Step 1
First, get out all of the devices like this. (You do not need to put them in this order, but it looks better this way) I will be using triggers for my code, but feel free to use buttons. (I forgot the checker here, but I will add it later on.)
Step 2
Use wires to connect all of the triggers/buttons to their respective counter, and make sure it is selected to count up.
Step 3
To make the counters reset when they get above 9, we need channels. Use a separate channel for each, and call them whatever you want, and put them in both target and reset counter. (Make sure the target is set to 10!)
Step 4
Now, test it to see if the looping of numbers works. If it works, great! Now we need to connect each of the counters to the properties. I would just name them #1, #2, #3, and #4. (Make sure that the properties are numbers and not text!)
Step 5
In the checker, make the number of checks equal to 4. In each of the checks, make it check properties, and make them equal to whatever number you want (I am going to make my code 1214) (Make sure that the checker’s pass condition is “All checks must pass”).
Step 6
Make a way to check the code, like a separate trigger or button. I am just going to make a repeater check every 0.5s, and a barrier block a path. Use wires or broadcasts, (I used broadcasts because they take up less space).
I hope this was useful!