Hello,
Currently I am working on a Admin Panel. I want that when you kick someone that action is being saved so for example a manager can look back in the logs who kicked that player. For that I need to save 4 things, the action (kick), the moderator, the reason and the date. I was trying to save this via an Array, but then I get the error “DataStoreService: CantStoreValue: Cannot store Array in data store. Data stores can only accept valid UTF-8 characters.”. How do I save an array or multiple values to a datastore?
local DataBase = game:GetService("DataStoreService"):GetDataStore("VJAdminDB")
script.Parent.MouseButton1Click:Connect(function()
local ProfileKey = "Profile_5149314582_" .. game.GameId
local ProfileData = {
"Kick", "VervelendJong (1723768065)", "System Test", DateTime.now()
}
local Success, Failure = pcall(function()
DataBase:SetAsync(ProfileKey, ProfileData)
end)
if Success then
print("Success")
else
print("Fail")
end
end)