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

Can anyone help me with this error? Color3 expected got brickcolor

Si i want to get not many scripts to team somone or many remote events? So i tried this but it won't work? Localscript:

local player = game.Players.LocalPlayer
local team = "Politie"

script.Parent.MouseButton1Click:Connect(function()
	if player.Rank.Politie.Value == true then 
		game.ReplicatedStorage.Teams.Teamen:FireServer(team)
	end
end)

Script in SSS:

game.ReplicatedStorage.Teams.Teamen.OnServerEvent:Connect(function(player, team)
	local realteam = game.Teams:FindFirstChild(team)
	player.TeamColor = BrickColor.new(realteam.TeamColor)
	player:LoadCharacter()
end)

but i get the error Color3 expected got brickcolor? line3

1 answer

✓ Accepted answer

So on Line 3, you don't need to write: player.TeamColor = BrickColor.new(realteam.TeamColor)

You don't need to create a new BrickColor, so you should just take away the "BrickColor.new()" and instead have:

player.TeamColor = realteam.TeamColor

Hope it worked!

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