RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make me a group rank overhead nametag with different colors each rank"
-- local script (StarterPlayer > StarterPlayerScripts) local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local function createNametag(rank, color) local billboardGui = Instance.new("BillboardGui", character) billboardGui.Size = UDim2.new(0, 100, 0, 50) billboardGui.StudsOffset = Vector3.new(0, 2, 0) local textLabel = Instance.new("TextLabel", billboardGui) textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.Text = rank textLabel.TextColor3 = color textLabel.BackgroundTransparency = 1 textLabel.Font = Enum.Font.SourceSansBold textLabel.TextScaled = true end local function onCharacterAdded(character) local groupId = 123456 -- Replace this with your group ID local rank = player:GetRankInGroup(groupId) if rank >= 1 and rank <= 10 then createNametag("Rank 1-10", Color3.fromRGB(255, 255, 255)) elseif rank >= 11 and rank <= 20 then createNametag("Rank 11-20", Color3.fromRGB(0, 255, 0)) elseif rank >= 21 and rank <= 30 then createNametag("Rank 21-30", Color3.fromRGB(0, 0, 255)) else createNametag("No Rank", Color3.fromRGB(128, 128, 128)) end end if character then onCharacterAdded(character) end player.CharacterAdded:Connect(onCharacterAdded)