3KatW
(VPN)
September 16, 2024, 5:36pm
1
This is my first time trying to achieve this as I only know about overwriting data, which isn’t very helpful in my case.
Here’s my awful code which may make some laugh
local userModerationLogs = {}
local newEntry = {}
newEntry["Moderator"] = plr.Name
newEntry["Action"] = Action
newEntry["Date"] = tostring(os.date("%x"))
Objects.ModActionsLog:UpdateAsync(Services.Players:GetUserIdFromNameAsync(User), function(oldData)
return table.insert(oldData, userModerationLogs)
end)
If you have solution to this it would greatly appreciated!
NotNlkko
(Nikko)
September 17, 2024, 3:41am
2
Assuming oldData is the player’s datastore information it should be as simple as this:
local newEntry = {}
newEntry["Moderator"] = plr.Name
newEntry["Action"] = Action
newEntry["Date"] = tostring(os.date("%x"))
Objects.ModActionsLog:UpdateAsync(Services.Players:GetUserIdFromNameAsync(User), function(oldData)
return table.insert(oldData, newEntry)
end)
All this does it just adds another table/dictionary to the preexisting player data table.
system
(system)
Closed
October 6, 2025, 5:41am
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.