Gamepass skipStage not working

Hey everyone, So I am adding my finishing touches to my halloween obby, and I want to have a skipStage button, it works, but doesn’t at the same time. Every Single time you click on it, The gui for the gamepass comes down but it says this…

failedtopurchase

Not sure if this is because of Roblox or it’s because of my script. Here is my SCRIPTS

(First Script is inside of startergui with the GUI. This script is a server script)

local id = 1107605496


script.Parent.MouseButton1Click:Connect(function()
	local ms = game:GetService("MarketplaceService")
	ms:PromptGamePassPurchase(game.Players.LocalPlayer, id)
end)

(This script is inside of ServerScriptService, And it’s a server script)

local MPS = game:GetService("MarketplaceService")
local id = 1107605496

MPS.ProcessReceipt = function(reciptInfo)
	if reciptInfo.ProductId == id then
		local player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
		player.leaderstats.Stage.Value = player.leaderstats.Stage.Value + 1
		local char = game.Workspace:FindFirstChild(player.Name)
		local checkpoint = game.Workspace.Stages:FindFirstChild(player.leaderstats.Stage.Value)
		char:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(checkpoint.Position + Vector3.new(0,5,0), checkpoint.Position)
		char:FindFirstChild("HumanoidRootPart").Orientation = Vector3.new(0,0,0)
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
end

If anyone knows why this is happening please let me know. Thanks ahead of time! :))

Are we talking about buying a gamepass or a developer product? If we are talking about a developer product then you need to used PromptProductPurchase.

One of the lines closer to the top displays ms:PromptGamePassPurchase() instead of ms:PromptProductPurchase(). If this is a developer product, then that’s why your code is not working. Only use ms:PromptGamePassPurchase() for gamepasses.

Yeah, it’s a devproduct, Sorry, I’m still new to scripting.

Thats okay!

Charsssssssssssssss

Jesus, why are you always here to come to my rescue lol.

I really don’t want to make another topic because then I feel like people will think that I don’t try to figure it out before I post on here but, whenever a player respawns or spawns on a checkpoint, the body always looks like a fish out of water. I tried changing the position but that didn’t work. Do you have any ideas?

local Stages = workspace:WaitForChild('Stages')
local Replicated = game:GetService('ReplicatedStorage')

for _,v in pairs(Stages:GetChildren()) do
	v.Touched:connect(function(hit)
		local Player = game.Players:playerFromCharacter(hit.Parent)
		if hit.Parent ~= nil and Player ~= nil then
			if Player.leaderstats.Stage.Value == tonumber(v.Name) - 1 then
				local h = hit.Parent:FindFirstChild("Humanoid")
				if h ~= nil and h.Health ~= 0 then
					Player.leaderstats.Stage.Value = v.Name
					Replicated:WaitForChild('Events'):WaitForChild('Checkpoint'):FireClient(Player,v)
				end
			end
		end
	end)
end

game.Players.PlayerAdded:connect(function(Player)
	local Leaderstats = Instance.new("Folder",Player)
	Leaderstats.Name = "leaderstats"
	local Stage = Instance.new("IntValue",Leaderstats)
	Stage.Name = "Stage"
	Stage.Value = 1
	Player.CharacterAdded:connect(function(Char)
		repeat wait() until Char ~= nil
		local StagePart = Stages:FindFirstChild(Stage.Value)
		local HRP = Char:FindFirstChild('HumanoidRootPart')
		HRP.CFrame = StagePart.CFrame + Vector3.new(0, 4, 0)
	end)
end)

What exactly do you mean by a “fish out of water”? Do you have any screenshots?

It glitches on the floor, it falls flat on it’s face like it doesn’t have bones. Then it jumps up.

This could be that one of the parts that your character teleports to when respawning is too low. Try moving it up a little and see if that resolves the problem.

Wdum too slow? There isn’t a time thing on it or anything.

The position that the player teleports to is too low that it is causing the player to glitch in the floors.

ohhhhhhhhhhhhhhhhhhhhhhhhh, ok, let me try that.