Here are the Variables I assigned:
local ds = game:GetService("DataStoreService")
local ds1 = ds:GetDataStore("Vrank")
local ds2 = ds:GetDataStore("ARank")
local owner
local admin = {}
local votePerms = {}
This is what I used to retrieve all the data saving into that table:
local s, e = pcall(function()
for i, v in ipairs(ds1:GetAsync("VoteStarters",votePerms)) do
table.insert(votePerms, #votePerms+1, v)
end
end)
Finally, the code that is supposed to insert and save new data into the table:
if args[2] then
if game.Players:FindFirstChild(args[2]) then
local newRank = game.Players:FindFirstChild(args[2]).UserId
table.insert(votePerms, #votePerms+1, newRank)
local s, e = pcall(function()
ds1:SetAsync("VoteStarters",votePerms)
end)
end
end
Thank you for taking the time to read this!

1 comment
Thank you!