Gamepass Worked Now Doesn't?

So I had a gamepass Script that was working perfectly fine before, everything was right and worked for as long as I can remember, well now it doesn’t. I went to (in studio),

  1. Test
  2. Start (Local Server, 1 Player)

Then the following happens,


It didn’t do this before and here’s the script,
local id = 6170599
local mp = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		mp.PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
			if purchased and id == ido then
				local trail = game.ServerStorage.RainbowTrail:Clone()
				trail.Parent = char.HumanoidRootPart
				trail.Name = "CurrentTrail"
				local attachment0 = Instance.new("Attachment",char.Head)
				attachment0.Name = "TrailNum0"
				local attachment1 = Instance.new("Attachment",char.HumanoidRootPart)
				attachment1.Name = "TrailNum1"
				trail.Attachment0 = attachment0
				trail.Attachment1 = attachment1
			end
		end)
	end)
end)
		
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		if mp:UserOwnsGamePassAsync(player.UserId,id) then
			local trail = game.ServerStorage.RainbowTrail:Clone()
			trail.Name = "CurrentTrail"
			trail.Parent = char.HumanoidRootPart
			local attachment0 = Instance.new("Attachment",char.Head)
			attachment0.Name = "TrailNum0"
			local attachment1 = Instance.new("Attachment",char.HumanoidRootPart)
			attachment1.Name = "TrailNum1"
			trail.Attachment0 = attachment0
			trail.Attachment1 = attachment1
		end
	end)
end)

Any Help is appreciated, thanks in advanced,
-Notrealac0unt

5 Likes

I’m not sure if this matter but, are you using PromptGamePassPurchase or PromptPurchase?

PromptGamePassPurchase is what I used in a Local Script

I’m curious (i know its a bit off topic) but do you need to connect PromptGamePassPurchaseFinished every time the character is added? If not doesn’t this mean when the player buys the gamepass that they would receive the trail a lot of times depending on how many times characters have been added.

Would you mind showing us?

local mp = game:GetService("MarketplaceService")

id = 6170599

script.Parent.MouseButton1Click:Connect(function()

mp:PromptGamePassPurchase(game.Players.LocalPlayer,id)

end)

Also I got to go I’ll check in as soon as I get back

Is the gamepass owned by a Third-Party or is it linked to your game?

Linked to my game and it worked perfectly fine before

This is happening on my game too, its probably something that roblox changed.
Bug report?

I’m experiencing this issue as well. I used the code below in a LocalScript and it resulted in the same error.

game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, 1655915)

I think this warrants a bug report.

You can post a bug report through the Post approval process. I recommend doing this if this truly is a bug.

1 Like

I know others are seeing this issue in there games as well and @Preloader is trying to go about it through the Post approval process as stated by @REALTimothy0812 but is this an actual bug or is there actually something wrong with the script?

It seems like a bug. The script should work fine under normal circumstances.

Roblox is normally buggy once it comes to this, scripts work in studio but in game. Maybe you modify find the error and modify the script accordingly.

This still seems to be happening. I am attempting to purchase a GamePass in Team Create of a place that doesn’t own the pass (our testing universe).

1 Like

Please refer to the following bug report: