Hey there people of the world! I've had a few months break from writing lua, so my knowledge isn't the best right now, i'm wondering how to change the color of my text label while creating buttons for my team changer.
My error is "Unable to cast int to int"
No idea what that means.
My current script:
Line 13, btw.
-- Dynamic team changer created by BashGuy10
-- Create teams inside the teams service, with a boolen value called "TeamChange", setting to true means the team will show on the team changer, setting it to false.
local players = game:GetService("Players")
local localplayer = players.LocalPlayer
local teams = game:GetService("Teams")
local template = script.Parent.Template
for i, v in pairs(teams:GetChildren()) do
if v:WaitForChild("TeamChange").Value then
local clone = template:Clone()
template.Parent = script.Parent.Frame.TeamFrame
template.Name = v.Name
template.TextColor3 = Color3(BrickColor.palette(v.TeamColor))
template.TextTransparency = 0
end
end

4 comments
try replacing teams:GetChildren() with teams:GetTeams() since you're trying to get the teams, not the children. if you have something else besides a team inside of game.Teams, you might run into an error . your variable teams is a bit ambiguous as well. it suggests that teams is a table containing the teams, but it's actually the teams service. You are also changing the parent/name/text of vvvv
the template instead of the clone. Is this intentional?
oh i forgot to change that while writing it lol
it ok. i replied to ur post if you havent seen it yet. you went offline as soon as i posted :(