✓ Accepted answer
Whenever you are trying to access a ScreenGui from the client you do not use StarterGui. StarterGui is just the container of all of the ScreenGui's that a play would receive upon joining your game. Instead you would want to access the LocalPlayer's PlayerGui.
Whenever you are doing yielding calls, such as, UserOwnsGamePassAsync() make sure to use pcalls like I did below to prevent your entire codebase from erroring, and you not knowing why.
local MarketplaceService = game:GetService("MarketplaceService")
local GAMEPASS_ID = 97155762
local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local mainGui = playerGui:WaitForChild("ScreenGui")
local mainFrame = mainGui:WaitForChild("MainFrame")
local soccerWorldButton = mainFrame:WaitForChild("soccerworld")
local cityWorldButton = mainFrame:WaitForChild("gotocity")
local ownsGamepass = false
local success, err = pcall(function()
ownsGamepass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, GAMEPASS_ID)
end)
if not success then
warn(tostring(err)
return
end
soccerWorldButton.Visible = ownsGamepass
cityWorldButton = ownsGamepass