Would the following script work to find the game owners ID?
local PlaceId = game.PlaceId
local PlaceInfo = game:GetService("MarketplaceService"):GetProductInfo(PlaceId)
local gameOwner = nil
if game.CreatorType == Enum.CreatorType.Group then
gameOwner = game:GetService("GroupService"):GetGroupInfoAsync(PlaceInfo.Creator.CreatorTargetId).Owner.Id
else
gameOwner = game.CreatorId
end
game.CreatorId points to the ID of the player or the group that owns the place, so there is no need to make the call to MarketplaceService (which is probably where the issue is).
local gameOwner
if game.CreatorType == Enum.CreatorType.Group then
gameOwner = game:GetService("GroupService"):GetGroupInfoAsync(game.CreatorId).Owner.Id
else
gameOwner = game.CreatorId
end
This will return the ID of the owner of the place (if it’s owned by a player) or the ID of the owner of the group that owns the place (if it’s owned by a group). Based on your original script, I assume this is what you want.
This might be a little OT but figured this advice might be helpful. It’s rather pointless using a system such as this to prevent leaking as the script, or that portion of the script can very easily be removed.