Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I give a player a rank if in group?

Hey This is my current script and Im not sure how to give a player a rank if they are in a group (but I would like there rank to over-ride if I have them with a different rank for example I have a person who is in my group so they get Fan rank but I set there rank in the script to Helper how would I make sure the rank doesnt break?

local Players = game:GetService("Players")
local ScriptService = game:GetService("ServerScriptService")
local ChatService = require(ScriptService:WaitForChild("ChatServiceRunner").ChatService)




--[==[ END TABLE FOR TAGS ]==]--


ChatService.SpeakerAdded:Connect(function(SpeakerName)
	
    if game.Players:FindFirstChild(SpeakerName) then
	
		local plr = game.Players:FindFirstChild(SpeakerName)
	
        local UserId = plr.UserId
        local Speaker = ChatService:GetSpeaker(SpeakerName)

        if plr.UserId == 200677889  then
	
              Speaker:SetExtraData("Tags", {{TagText = "Boss", TagColor = Color3.fromRGB(241,196,15)}})
              Speaker:SetExtraData("NameColor", Color3.fromRGB(241,196,15))


1 answer

✓ Accepted answer

Use the simple Plr:IsInGroup(GroupId) and have it sent the rank from there

1 comment

0

thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.