I want to make all players throw up for one command if the object is the right color. I do not know how to write a change to TeamColor.
The script itself
local player = game.Players.LocalPlayer
if game.Workspace.NYGNO.BrickColor == BrickColor.new("Really black") then player.TeamColor = end
You cannot use LocalPlayer in a server-side Script. Use PlayerAdded event that is accessible by scripts.
TeamColor property needs a BrickColor value so you can use the Part's BrickColor you're using.
--Assuming you have a team in Teams with the proper BrickColor set on it: local part = workspace:WaitForChild("NYGNO") --Waiting for your part to load in local brickColor = BrickColor.new("Really black") --This is up here that way you can change it later game.Players.PlayerAdded:Connect(function(player) if part.BrickColor == brickColor then player.TeamColor = brickColor end end)
edit: readability