Checking player's teamcolor to assign a loadout

I currently am working on a script for a military group that allows the ability to have custom load-outs and usually you have to be in a group to get one or be assigned manually, but now I have a raiders team that I want to have a ‘ranker’ load-out as soon as they spawn in without doing it manually. This is what I have so far:


If you’re unclear on what some things mean please ask for a certain value or any other information you may need to find a solution. I should reply fairly fast.

The issue is at 131-134

1 Like

if gcolor.Name == “Really red” then

1 Like

Wow, I had no idea it would be solved because I missed one word, I thank you so much as I was very overwhelmed at the time.

2 Likes

Always annoying when you find out it’s such a simple fix

1 Like

It may be better for you to reference the teamcolor of the team in question directly.

For example, for a “Raider” team you should do

if gcolor == game.Teams.Raider.TeamColor then

This makes it so that you can change the team color of the team without breaking your scripts. It also makes the scripts more readable.

1 Like