Full disclosure... I've learned how to do simple stuff with values, loading custom characters, etc. I'm basically a noob though.
I can't figure out what I am doing wrong here.
local plr = game.Players.LocalPlayer plr.TeamColor.Name = "Bright yellow"
why doesn't this change the team to bright yellow?
When you assign a players team by their teamColor you need to use the BrickColor Constructor
local plr = game.Players.LocalPlayer plr.TeamColor = BrickColor.new("Bright yellow")
aazkao is correct on one thing: You need to use BrickColor
, not TeamColor.Name
(error will output: "game.Players.AzariahJenkins.TeamcColor.Name = nil" or something along those lines)
You also need to be sure that you are using a Client-Side Script
(local), not a Server-Side Script
(plain).
To summarize:
• Use a LocalScript
• Using a client-side script
, you can't call LocalPlayer
in a server-side
or it will cause an error.
• Use plr.TeamColor = BrickColor.new("Bright yellow")
Nothing more to it!
Is this the full script?