When i switch to raider team and i chatted my rank appears.. Why is it not "RAIDER"?..
--> Line 15
local plr = game.Players.LocalPlayer local chat = game.ReplicatedStorage.ChatHandler.ChatHistory local last local GroupId = 2642682 function newChat(msg,plr) if #msg > 0 then for i, c in pairs(chat:GetChildren()) do c.Position = c.Position - UDim2.new(0, 0, 0.1, 0) end local newMessage = script.Msg:clone() if #chat:GetChildren() == 6 then chat:GetChildren()[1]:Destroy() end if plr.Team == "Raiders" or plr.TeamColor == "Bright red" then newMessage.Text = "[RAIDER] "..plr.Name..": "..msg newMessage.Raider.Visible = true else newMessage.Rank.Text = "["..plr:GetRoleInGroup(GroupId).."] " newMessage.Text = "["..plr:GetRoleInGroup(GroupId).."] "..plr.Name..": "..msg newMessage.Rank.Visible = true end newMessage.Visible = true newMessage.Position = UDim2.new(0, 0, 0.6, 0) newMessage.Parent = game.ReplicatedStorage.ChatHandler.ChatHistory last = newMessage end end game.Players.LocalPlayer.Chatted:connect(function(msg) newChat(msg, plr) print("newChat") game.ReplicatedStorage.ChatHandler.NewMsg:FireServer(plr, msg) print("FireServer") end)