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

Is there a way to convert "BrickColor" to "Color3"?

Asked by 4 years ago

I am attempting to make an Overhead rank GUI. Everything works perfectly I just want to make it so the TextStrokeColor3 is the same color as the team. My only problem being that TextStrokeColor3 wants Color3 and TeamColor is BrickColor. I've gone through couple of things cant find a working request. Code below.

local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")

game.Players.PlayerAdded:Connect(function(player)

    player.CharacterAdded:Connect(function(character)
        local clonedgui = billboardgui:Clone()
        clonedgui.Frame.PlrName.Text = player.Name
        clonedgui.Frame.Rank.Text = game.Players:WaitForChild(player.Name):WaitForChild("leaderstats").Rank.Value
        clonedgui.Frame.Ministry.Text = player.Team.Name
        local color = BrickColor.new(player.TeamColor).Color
        clonedgui.Frame.Ministry.TextStrokeColor3 = color
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head -- Yes, you can also just say character.Head                   
    end)
end)


2
I think on line 10 you can do like this; local color = player.TeamColor.Color Spjureeedd 385 — 4y
0
We have BrickColor.Color which is return Color3 of the BrickColor https://developer.roblox.com/en-us/api-reference/datatype/BrickColor Block_manvn 395 — 4y
2
That's what I said?? Spjureeedd 385 — 4y
0
Oh sorry :) Block_manvn 395 — 4y

Answer this question