hello im a newbie in scripting and i'm making a game and it has 3 teams i created a gui with textlabel and the text change in base of the team name , colors too but it dosent work, how can i fix it?
local player = game:GetService("Players")
if player.Team == ("clandestin") then
script.Parent.TextLabel.Text = player.Team.Name
script.Parent.TextLabel.BackgroundColor3 = Color3.fromRGB(190, 71, 11)
end
if player.Team == ("cittadino") then
script.Parent.TextLabel.Text = player.Team.Name
script.Parent.TextLabel.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
end
if player.Team == ("controllore") then
script.Parent.TextLabel.Text = player.Team.Name
script.Parent.TextLabel.BackgroundColor3 = Color3.fromRGB(22, 67, 190)
end

1 comment
Btw use ElseIf after one If that's the main issue