Infinite Yield on table construction

I have some code that checks gamepasses ( you can view the code at the bottom of this post ) and the code never moves past the construction of table “Gamepass”.

The output only shows:
“hello do i even work? part 1”, and
“hello do i even work? part 4”

I’ve tried everything I know but I don’t understand what the issue is.
Any help would be appreciated!

The code:

print("hello do i even work? part 1")

local Players = game:GetService("Players")
local Market = game:GetService("MarketplaceService")

print("hello do i even work? part 4")

local Gamepass = {
    --umbara gamepasses
    ["20342396"] = game.ServerStorage.Gamepasses["Thermal"],
    ["20342234"] = game.ServerStorage.Gamepasses["DC-15A"],
    ["20342247"] = game.ServerStorage.Gamepasses["DC-15s"],
    ["20342384"] = game.ServerStorage.Gamepasses["Z-6"],
    ["20342455"] = game.ServerStorage.Gamepasses["FirstAid"],
    ["20342490"] = game.ServerStorage.Gamepasses["E-9S"],
    ["20342278"] = game.ServerStorage.Gamepasses["DC-15x"],
    ["20342287"] = game.ServerStorage.Gamepasses["DC-17ms"],
    ["20342304"] = game.ServerStorage.Gamepasses["DC-17m Grenade Launcher"],
    ["20342337"] = game.ServerStorage.Gamepasses["Light Saber"],
    ["20342372"] = game.ServerStorage.Gamepasses["Westar-35 Carbine"],

print("hello do i even work? part 3")

local function CheckPasses(Player)
    for _PassID,_PassTool in pairs (Gamepass) do
        if Market:UserOwnsGamePassAsync(Player.UserId, _PassID) then
            _PassTool:Clone().Parent = Player:WaitForChild('Backpack')
            _PassTool:Clone().Parent = Player:WaitForChild('StarterGear')
            print("they own gamepasses :)")

local function onPlayerAdded(Player)
    --repeat wait() until Player.Backpack and Player.StarterGear


print("hello do i even work? part 2")```
1 Like

weird, does the .Gamepasses exist?
the only thing i can think of is that they somehow doesnt exist and silent-errored