Heyo! I made kick logs and was wondering if there is anyway on how to create a table in a datastore when one already exists?
Ive tried a couple different ways and none has worked.
(I want it like this)
Code:
local moderator = {"CashoutSwervro","NDavis06"}
local DataStoreService = game:GetService("DataStoreService")
local KickLogs = DataStoreService:GetDataStore("KickLogs")
game.ReplicatedStorage.Exploit.OnServerEvent:Connect(function(Player, Hack ,Extra)
local List = {}
print(#List+1)
List[#List+1] = {PlayerName = Player.Name,Reason=Hack,ExtraReasoning=Extra}
--table.insert(List,{PlayerName = Player.Name,Reason=Hack,ExtraReasoning=Extra})
--local HTTP = game:GetService("HttpService")
--local B = HTTP:JSONDecode(A,Enum.HttpContentType.ApplicationJson)
KickLogs:SetAsync("ExploitLogs~" .. Player.UserId,List)
Player:Kick(Hack,Extra)
end)