Need help with group chat tags

You forgot the end for the if not table.find(Tags, Player.Name) then

ok the tag works again now but it still says group member

local ServerScriptService = script.Parent
local ChatServiceRunner = ServerScriptService:WaitForChild("ChatServiceRunner")
local ChatService = require(ChatServiceRunner:WaitForChild("ChatService"))

local Tags = require(script.Tags)

local function CheckForTags(Player)
	for i,Player in pairs(game.Players:GetChildren()) do
		if not table.find(Tags, Player.Name) then
		if Player:IsInGroup(13761066) then -- My group (you should join)
			Tags[Player.Name] = {
				["TagText"] = "Group Member"; -- Replace with your text
				["TagColor"] = Color3.fromRGB(255, 0, 0) -- Replace with your color
			}
		end
	end
	local Attempt = Tags[Player.UserId] or Tags[Player.Name]

	if Attempt then
		local SpeakerObject

		repeat

			wait()

			SpeakerObject = ChatService:GetSpeaker(Player.Name)
		until SpeakerObject ~= nil

		SpeakerObject:SetExtraData("Tags", {Attempt})
	else
		print("No chat tags for "..Player.Name.."!")
	end
end

game.Players.PlayerAdded:Connect(function(Player)


	CheckForTags(Player)
	end)
end

for _, Player in pairs(game.Players:GetPlayers()) do
	CheckForTags(Player)
end

module:

local module = {
	[game.CreatorId] = {
		["TagText"] = "🔨";
		["TagColor"] = Color3.fromRGB(255, 200, 0)
	};
}
return module
local ServerScriptService = script.Parent
local ChatServiceRunner = ServerScriptService:WaitForChild("ChatServiceRunner")
local ChatService = require(ChatServiceRunner:WaitForChild("ChatService"))

local Tags = require(script.Tags)

local function CheckForTags(Player)
	for i,Player in pairs(game.Players:GetChildren()) do
		if not table.find(Tags, Player.Name) then
			if Player:IsInGroup(13761066) then -- My group (you should join)
				Tags[Player.Name] = {
					["TagText"] = "Group Member"; -- Replace with your text
					["TagColor"] = Color3.fromRGB(255, 0, 0) -- Replace with your color
				}
            end
		end
	end
	local Attempt = Tags[Player.UserId] or Tags[Player.Name]

	if Attempt then
		local SpeakerObject

		repeat

			wait()

			SpeakerObject = ChatService:GetSpeaker(Player.Name)
		until SpeakerObject ~= nil

		SpeakerObject:SetExtraData("Tags", {Attempt})
	else
		print("No chat tags for "..Player.Name.."!")
	end
end

game.Players.PlayerAdded:Connect(function(Player)


	CheckForTags(Player)
	end)
end

for _, Player in pairs(game.Players:GetPlayers()) do
	CheckForTags(Player)
end

Replace it with that and set the module script back to the original:

local module = {
	["YT_Lemont"] = {
		["TagText"] = "🔨";
		["TagColor"] = Color3.fromRGB(255, 200, 0)
	};

	["Electroyzm"] = {
		["TagText"] = "🔨";
		["TagColor"] = Color3.fromRGB(255, 200, 0)
	};
}

return module

still says group member, I think roblox hates me or something

there’s this now
image
wait nvm I don’t think the second one has anything to do with this

I deleted the “end” and there is no error now, but it still doesn’t work

I don’t know what’s going wrong, but my script works and should work for you. I don’t really know what to say ¯\_(ツ)_/¯

1 Like

ig I am just cursed or something, tyvm for your help!

1 Like