Hello,

Context: - I'm trying to create an !addteam player color command to my game.

Problem: - I am having trouble with finding a brickcolor shortening algorithm. I would want something like this:

print(Shortening("Really re")) -- -> Really Red

I do not know how to start scripting this, as I cannot find a table with every brickcolor in it to run a comparison.

Any advice/solutions you have will be appriciated.

Tweakified

5 comments

0

I would be guessing using color codes, which a simple google search can find.

0

string.find

0

How can you use string.find, when I don't have an array of all of the BrickColors?

0

Wait, will this command create a team or will the team already be there? If it's already there you can go through the teams and compare BrickColors from there

0

It is supposed to create a new team. The command would be like !addteam A Really red. -> Creates a team (named A) with the team color red