What do you want to achieve?
So I’m trying to make a chat nametag that is given to the members of this group: Project: New Edition - Roblox (ID: 16438390), who has a certain rank.
What is the issue?
I don’t know how I could do that.
What solutions have you tried so far?
I searched both for chat nametag and group rank but I have no idea how I could do that.
Thanks for reading and probably helping, have a great day and happy developing!!
game.Players.PlayerAdded:Connect(function(player)
local GROUP_ID = 16438390 --Your group ID.
if player:GetRankInGroup(GROUP_ID) == 255 then
--Give owner name tag.
else
--Player is not the owner.
end
end)
If you have any questions make sure to ask. If I helped you make sure to mark this as a solution!
local function CREATE_CHAT_TAG(player, name, color)
local CS = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local Speaker = CS:GetSpeaker(player.Name)
Speaker:SetExtraData("Tags", {{TagText = name, TagColor = color}})
end
game.Players.PlayerAdded:Connect(function(player)
local GROUP_ID = 16438390 --Your group ID.
local RANK = player:GetRoleInGroup(GROUP_ID)
CREATE_CHAT_TAG(player, RANK, Color3.new(1, 0.235294, 0.247059))
end)
Sorry for the late response, I tried the script in Studio and it doesn’t work, I don’t get the chat nametag. I’m using the old chat service, is that why?