I am trying to get the owner of a group, but this method always fails and it causes the same error every single time. I found 1 topic about this, but it had no answers. I was using a pcall before, but I realized that it literally never ran successfully so I removed it so I can debug faster.
if gameID.Creator.CreatorType == "User" then
creatorId = gameID.Creator.Id
elseif gameID.Creator.CreatorType == "Group" then
creatorId = GroupService:GetGroupInfoAsync(gameID.Creator.Id).Owner.Id
end
This script works perfectly fine if the creator is a user, but if its a group it will just give me the same error (Topic title).
Im using :GetProductInfo() to get the game info so it shouldn’t be the issue
local function getInfo(id)
local isgame
local gameInfo
local success, message = pcall(function()
gameInfo = game:GetService("MarketplaceService"):GetProductInfo(id)
isgame = gameInfo.AssetTypeId == 9
end)
if success and isgame then
return gameInfo
else
return nil
end
end
Which returns something likes this
{
["AssetId"] = 10355512029,
["AssetTypeId"] = 9,
["ContentRatingTypeId"] = 0,
["Created"] = "2022-07-25T16:36:18.887Z",
["Creator"] = ▼ {
["CreatorTargetId"] = 15480932,
["CreatorType"] = "Group",
["HasVerifiedBadge"] = false,
["Id"] = 3741913119,
["Name"] = "Aficionados"
},
["Description"] = "Its best to play with a friend and only talk in game using you're phone.
Game Jam project
{ Work in progress }
Animator - cyrusrobloxplayz
Builder/GUI - TheMr8bit
Scripter - IDEADZOMBIE_XX
Scripter - cakeycocoa
You might be wondering why we didn't use teleport service so we dont have to shutdown the server when 1 player leaves, well thats because the GameJam had a rule to not use teleport service.
",
["IconImageAssetId"] = 11300039640,
["IsForSale"] = false,
["IsLimited"] = false,
["IsLimitedUnique"] = false,
["IsNew"] = false,
["IsPublicDomain"] = false,
["MinimumMembershipLevel"] = 0,
["Name"] = "Alteration",
["ProductId"] = 0,
["Sales"] = 0,
["TargetId"] = 0,
["Updated"] = "2023-03-26T07:30:32.983Z"
}
But I just realized that Creator.Id isn’t the group ID for some reason.
Looks like I need to be using Creator.CreatorTargetId not Creator.Id, also sorry for not mentioning that im using this method to get the IDs and stuff earlier.