My friend has challenged me to make a little GUI that shows the Attendance of a group. The admin will say !attend along with a player's name and it will give them one attendance point.

I've been using this wiki page for guidance, but right now I have no idea how I can just make a list (Not necessarily in order) of all the players that were given points.

The script is currently inside a TextLabel in the scrolling GUI.

The page tries to explain, but it's just hard to understand. If someone could at least show me an example of what I need to do, with our without (I'd prefer without so I can learn myself how to do this, but either way is good) putting it in with my code, that would be great.

local ods = game:GetService("DataStoreService"):GetOrderedDataStore("HighScore")

local admins = {"Sekrov", "kamalot69", "rezsoldier", "mad_i", "MoneyFolder", "BrokenRyan916", "Ealtrax", "Arxios", "Renz270", "Inf3ctedRogue", "jhaycee10", "Coleatteral", "defender2929", "Dan101Designs", "Drakkeno", "provolone", "Xinshu", "Tempestatem", "Obscuriti", "MathisGuidonsio"}
 
function tableContains(t, value)
    for _, v in pairs(t) do
        if v == value then 
            return true
        end
    end
    return false
end
 

game.Players.PlayerAdded:connect(function(plr)
	plr.Chatted:connect(function(chat)
		if chat:sub(1,7) == "!Attend" and tableContains(admins, player.Name) then
			PlrToGive=game.Players:FindFirstChild(chat:sub(9))
				ods.IncrementAsync(plr.Name, 1)
				
			
		end

	end)
end)


If there's any questions, please comment and I will try to clear up any misconceptions!

3 comments

1

u forgot the tablecontains function under the admins table

0

Can you elaborate on "shows the Attendance of a group"?

0

You join the game, then an admin will say "!attend (playernamehere)" and then it will give them one "Attendance point". The point will be used to keep track of how many events a member attends, which is what the leaderboard will be for, to simply see all the people who attended.