Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is my team creation script not working?

Hello, I have created the script below to make teams. Only the Not It team is being created, what is the reason for that? The script is in the Workspace under a normal script object.

redTeam = Instance.new("Team", game.Teams)
blueTeam = Instance.new("Team", game.Teams)
redTeam.TeamColor = BrickColor.new("Really Red")
blueTeam.TeamColor = BrickColor.new("Really Blue")
redTeam.Name = "It"
blueTeam.Name = "Not It"
redTeam.AutoAssignable = true
blueTeam.AutoAssignable = true

Thanks for reading!

1 comment

0

Your script seems to work fine in my place, you should try it again

1 answer

##Problem

Lua is case sensitive!


##Solution

Have correct casing on the BrickColor values. If it says "Bright blue", then you use "Bright blue" not "Bright Blue". The game is automatically combining the teams together since BrickColor.new() can not find the color you're looking for, it's defaulting to grey.


##Final Script

redTeam = Instance.new("Team", game.Teams)
blueTeam = Instance.new("Team", game.Teams)
redTeam.TeamColor = BrickColor.new("Really red")
blueTeam.TeamColor = BrickColor.new("Really blue")
redTeam.Name = "It"
blueTeam.Name = "Not It"
redTeam.AutoAssignable = true
blueTeam.AutoAssignable = true

######Hopefully this answered your question, if so please hit the accept answer button. If you have any questions feel free to leave a comment below and I will get back to you.

This discussion is preserved as it was. New answers, comments, and votes are closed.