UserOwnsGamePassAsync not working for me?

I need help!

  1. What do you want to achieve? My script stopped working in my game, it is a VIP gamepass.

  2. What is the issue? I do not know why, but randomly today (I think), it just stopped working.

  3. What solutions have you tried so far? I have looked on the developer hub and looked at my script closely, but nothing has changed. My script is below.

Script:

local bbg = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
local GamepassId = 30880118

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, GamepassId)
			local clonedgui = bbg:Clone()
			clonedgui.TextLabel.TextColor3 = Color3.fromRGB(180,170,50)
			clonedgui.TextLabel.Text = "VIP"
			clonedgui.Parent = game.Workspace:WaitForChild(plr.Name).Head
			local ClonedVIP = game:GetService("ServerStorage"):WaitForChild("GoldenFish"):Clone()
			ClonedVIP.Parent = plr.Backpack
		end
	end)
end)

If you can help, it will be greatly appreciated!

Is there any errors within the console/output?
Also, roblox is still having issue’s atm, so it might not be the script that’s broken.

Nope… It’ll be nice to get this fixed.

Alright, I revised over your script. It seems that on the devforum there’s no then to have the next function start which could be causing the issue.

local bbg = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
local GamepassId = 30880118

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, GamepassId) then
			local clonedgui = bbg:Clone()
			clonedgui.TextLabel.TextColor3 = Color3.fromRGB(180,170,50)
			clonedgui.TextLabel.Text = "VIP"
			clonedgui.Parent = game.Workspace:WaitForChild(plr.Name).Head
			local ClonedVIP = game:GetService("ServerStorage"):WaitForChild("GoldenFish"):Clone()
			ClonedVIP.Parent = plr.Backpack
	end
end)
end)