#Gamepasses delaying load time

1 messages · Page 1 of 1 (latest)

prisma nacelle
#

Added 5 gamepasses to my game that and run this module when the player joins

local GamePassChecker = {}

local MPS = game:GetService("MarketplaceService")

local passmapping = {
[1819880470] = "ExtraConveyor",
[1818549669] = "SuperBundle",
[1819982467] = "TwoTimesAfkRewards",
[1817929694] = "TwoTimesCoins",
[1817473777] = "TwoTimesDamage",
}

function GamePassChecker:Check(plrid, plrdata)
for id, pass in pairs(passmapping) do
local success, owns = pcall(function()
return MPS:UserOwnsGamePassAsync(plrid, id)
end)
if success and owns then
plrdata.GamePasses[pass] = true
end
end

if plrdata.GamePasses.SuperBundle then
    for pass, val in pairs(plrdata.GamePasses) do
        plrdata.GamePasses[pass] = true
    end
end


return plrdata

end

return GamePassChecker

i have a plot system that seems to have delayed its loading when i added the gamepass checking.
is this normal behaviour since it takes time to communicate?
should i add a loading screen or is there a way to make this instant.

lethal jewel
#

Yea checking if a player owns a gamepass is a short delay,

You shouldnt delay starting the game based on it IMO, refactor and let them play as the gamepasses load,
It dosnt matter if a buff isnt applied for the first few seconds of gameplay

prisma nacelle
lethal jewel
#

Could either switch it out during runtime when it detects the gamepass, this lets you add it to a shop to be brought mid game too,

Or only yield the loading for that 1 important gamepass, and let the others apply as they apply

flint hill
#

In the case of UserOwnsGamePassAsync, the method makes an HTTP request to Roblox's database to confirm ownership. Any sort of networking takes time to complete

#

If you're checking game-passes in a sequence, create a new thread for each check. If you do not do this, the additional checks cannot be initiated until all the ones before them are completed

lethal jewel
#

Even if you seperate it into seperate threads, wouldnt advise pausing a loading screen for gamepasses

alpine plover
#

just make a loading screen

prisma nacelle
wet hazelBOT
#

studio** You are now Level 7! **studio

hallow pawn
#

2x cash gamepasscrying

#

actually