I made this 7-segment display.
This only supports letters and numbers, and characters that are compatible with 7-segment displays. It also doesn’t include stuff like R
and W
, which has a 7-segment representaion, but personally I think it’s really weird.
Also note that, uppercase and lowercase letters are different, n
doesn’t have an uppercase represenation, it only has a lowercase one, if you inputted N
, it will be ignored.
If you want to add them, you can really! I will show you how you can add whatever you want.
The script is fully commeneted, but how does this work exactly?
Welp, basically, each number will have its own unique pattern that it uses to get displayed on one of these. Let’s say each of 7-segment’s segments is recognized by a number, which is also how I name each segment UI.
If I wanted to display 7
, I need to check which segments are turned on, and basically, the pattern will be a table of 7 members, where each value is either true
or false
, where true
means trun on and false
turn off. Each boolean value will correspond with a certain index, and that index is which segment to turn on. If we looked at 7, we need to note down which segments are on. They’re 3 and 6 and 7, so all of these indices in the table need to be true
, the rest is false
.
{false, false, true, false, false, true, true}
If you ever wanna add something, just find what segments need to be on, and make the pattern table.
This is creation’s file:
7-segment.rbxl (26.5 KB)
This is the texture I made and that I used for the segments: link
Thank you!