In the Explorer tab
ServerScriptService Script BlueTeam Tag (BillboardGui) RedTeam Tag (BillboardGui)
This is a script in Script
.
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(character) local humanoid =p:WaitForChild("Humanoid") humanoid.HealthDisplayDistance = 0 humanoid.NameDisplayDistance = 100 local Folder = script:FindFirstChild(p.Team.Name) if Folder then local Tags = Folder:FindFirstChild("Tag") if Tags then for i,v in pairs(Tags:GetChildren()) do v:Clone().Parent = p.Head end end end end) end)
The script helps displaying the circle (BillboardGui) on top of the player's head. The circle has 2 colors, red and blue, will be shown depending on the player's team. Somehow, the script does not work. Could anyone solve this?
p.Head
and the player Object doesn't have a head.p
with character
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(character) local humanoid =p:WaitForChild("Humanoid") humanoid.HealthDisplayDistance = 0 humanoid.NameDisplayDistance = 100 local Folder = script:FindFirstChild(p.Team.Name) if Folder then local Tags = Folder:FindFirstChild("Tag") if Tags then Tags:Clone().Parent = character.Head end end end) end)