SkipStageObby script not resetting the player

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
1 Like

You just need the humanoid.

local hum = char:WaitaforChild('Humanoid')
hum.Health = 0

A quicker method is:
player:LoadCharacter()

1 Like

This works, thanks.

local hum = char:WaitForChild('Humanoid')
hum.Health = 0

Best method as it’s instant and the player doesn’t have to wait. Thanks!

1 Like

Although the best way is what @AWhale_OfATime said.

Theres a another way to do hum.Health which is hum:TakeDamage(amountOfDamage)