Hey guys I need some help, I am making match matching system but
local function InsertPlayerInMatch(userId,t,index)
coroutine.wrap(function()
local suc,returned = pcall(Matchmatching.GetAsync,Matchmatching,"Matchs")
if (suc) then
if (returned) then
local Table = returned[index]
table.insert(Table.Players,userId)
MessagingService:PublishAsync('Player Joined',{Table.Owner,game.Players:GetNameFromUserIdAsync(userId)})
Matchmatching:UpdateAsync("Matchs",function(x)
return returned or x
end)
else
end
end
end)()
end
Something here is erroring D:
Table variable should return something like {Owner = someuserIdHere,Players = {userid,userid,etc}}
But for some reason it errors with Unable to cast dictionary to int64
Error is here;
MessagingService:PublishAsync('Player Joined',{Table.Owner,game.Players:GetNameFromUserIdAsync(userId)})