So I’m in the process of making an obby and I’m trying to incorporate a skip stage button. It works fine once the player has purchased the DevProduct and changes the stage as required, however it doesn’t reset them. Just looking for a quick solution to kill/respawn the player please?
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(recieptInfo)
if recieptInfo.ProductId == 1147845654 then
local player = game.Players:GetPlayerByUserId(recieptInfo.PlayerId)
player.leaderstats.Stage.Value = player.leaderstats.Stage.Value + 1
local char = game.Workspace:FindFirstChild(player.Name)
local checkpoint = game.Workspace.Checkpoints:FindFirstChild(player.leaderstats.Stage.Value)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end