I am trying to make VIP chat tags, and I have a module called titlemodule. Basically, I keep getting the error UserOwnsGamePassAsync() can only query local player, which I am confused about. Here is the code for the VIP module;
local HighRankList = {
[311040474] = 'Head Dev',
}
local saves = {}
function CreateTable(plr, tagType)
elseif tagType == 'Head Dev' then
return {title = '[VIP] [OG] [Head Developer]', priority = 5, color = Color3.fromRGB(0, 0, 255),
elseif tagType == "VIP" then
return {title = '[OG] [VIP]', priority = 2, color = Color3.fromRGB(255, 255, 0), color0 = Color3.fromRGB(255,255,255)}
elseif tagType == "OG" then
return {title = '[OG]', priority = 1, color = Color3.fromRGB(40, 255, 147), color0 = Color3.fromRGB(255,255,255)}
end
end
function sendInfo(player)
local info = saves[player.UserId]
if not info then
local priority = 0
if HighRankList[player.userId] then
info = CreateTable(player, HighRankList[player.UserId])
elseif game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 6770843) then
info = CreateTable(player, "VIP")
elseif game:GetService("MarketplaceService"):PlayerOwnsAsset(player, 3200445423) then
info = CreateTable(player, "OG")
end
if info == nil then
info = "placeholder"
end
saves[player.UserId] = info
return info
else
return info
end
end
return sendInfo
This error keeps happening, and is super annoying. If anyone could help I would appreciate it.