So I'm using this script to display a players name and rank in the group above their head. I currently have the script inserted in the StarterGUI folder. The name and rank is displayed above the player, but only on their screen. They cannot see anyone else's name or rank above that players head. I feel like this is due to Filtering Enabled, therefore I would like to know how to make this Filtering Enabled so that everyone can see the Name and Rank above the other players heads.
function checkTeam(player1) local team = nil local tc = nil for o,b in pairs(game.Teams:GetChildren()) do if b.TeamColor == player1.TeamColor then tc = b.Name end end for i,v in pairs(teams) do if v == tc then team = i end end local group = ids[team] return group end local player = game.Players.LocalPlayer function assessRank() if game.Players.LocalPlayer:IsInGroup(3087596) or not game:FindFirstChild("NetworkServer") then repeat wait() until game.Workspace:FindFirstChild(player.Name) repeat wait() until player.Character:FindFirstChild("Head") if player.Character:FindFirstChild("Rank") then player.Character.Rank:remove() end local a = script.Rank:clone() a.Parent = player.Character a.Adornee = player.Character.Head a.Frame.TextLabel.Text = player:GetRoleInGroup(3087596) a.Frame.Name1.Text = player.Name a.Frame.Name1.TextColor = player.TeamColor if a.Frame.TextLabel.Text == "TGAR" then a.Frame.TextLabel.Text = "TGAR" end if player.TeamColor == BrickColor.new("Institutional white") or player.TeamColor == BrickColor.new("White") then a.Frame.Name1.TextStrokeTransparency = 1 end if checkTeam(player) then a.Frame.TextLabel.Text = player:GetRoleInGroup(checkTeam(player)) end for c,b in pairs(terrorists) do if player:IsInGroup(0) then a.Frame.TextLabel.Text = "Hostiles" return end end repeat wait() until player.Character:FindFirstChild("Humanoid") player.Character.Humanoid.NameOcclusion = "OccludeAll" if player.Character:FindFirstChild("Body Colors") then player.Character["Body Colors"]:remove() end end end assessRank() game.Players.LocalPlayer.Changed:connect(function (prop) if prop == "TeamColor" then assessRank() end end)
It has nothing to do with FilteringEnabled. You would need to loop through all the players and do the same detection to see if their team has changed and then run the assessRank() function on their player to add the rank label to them.