Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Turning the TeamColor into a Color3 value?

Asked by 4 years ago
local User = script.User
local Rank = script.Rank

User.Parent = script.Parent.Head
Rank.Parent = script.Parent.Head


User.UserName.Text = script.Parent.Name

local function getPlayerFromCharacter(character)
        for e, player in pairs(game:GetService("Players"):GetPlayers()) do
        if player.Character == character then
            TeamColor = player.TeamColor
            return player
        end
    end
end

local Color = TeamColor.Color

User.UserName.TextColor3 = Color3.new(Color)
Rank.RankName.TextColor3 = Color3.new(Color)

This is a WIP ranking script, but when I run it the TextColor3 doesn't work?

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

You don't have create a new Color3 from the one you got from the BrickColor; instead of

User.UserName.TextColor3 = Color3.new(Color)

do

User.UserName.TextColor3 = Color
Ad

Answer this question