So I'm writing a system for my moderators to be able to easily view bans and then reason, date of ban and etc..
Here's my current script
local DataStoreService = game:GetService("DataStoreService"):GetDataStore("PlayerInfo")
game.Players.PlayerAdded:connect(function(plr)
local key -- where I'm having issues
local moderation = Instance.new("Folder", plr)
moderation.Name = "Moderation"
local baninfo = Instance.new("BoolValue", moderation)
baninfo.Name = "Banned"
local DOB = Instance.new("StringValue", moderation)
DOB.Name = "DateOfBan"
local BB = Instance.new("StringValue", moderation)
BB.Name = "BannedBy"
local UI = Instance.new("StringValue", moderation)
UI.Name = "UserId"
UI.Value = plr.userId
local nam = Instance.new("StringValue", moderation)
nam.Name = "Username"
local RS = Instance.new("StringValue", moderation)
RS.Name = "Reason"
local getSaved = DataStoreService:GetAsync(key)
if getSaved then
baninfo = getSaved[1]
else
local NumbersForSaving = {baninfo.Value}
DataStoreService:SetAsync(key, NumbersForSaving)
end
end)
game.Players.PlayerRemoving:connect(function(plr)
local key -- also where I'm having issues
local saveTable = {plr.moderation.Banned.Value}
DataStoreService:SetAsync(key, saveTable)
end)
what I want is to be able to use a key and then all the banned players names come up and then open up their name and see reason, date of ban, bannedby, and userId
I'm using Crazyman32's DataStore Editor as a way of viewing of the DataStore if that helps

4 comments
What do you mean by "All the banned players names come up"? Do you mean in a GUI?
yeah basically like if I enter a Datastore Key then it shows up a table of all the players and then be able to see a table of all the players data
This is just a script for saving those values. Did you attempt creation of a GUI?
I wouldn't know where to start also I'm mainly just looking for a way of storing everything under 1 key and being able to see the playersa info