Joined
·
32 Posts
I get
CurrentCheckPoint is not a valid member of Workspace "Workspace" - Server - SkipStagePurchaseHandler:16
The script is :
I have my checkpoints in my workspace as "Checkpoint:1" , "Checkpoint:2" and I don't know what the problem is
CurrentCheckPoint is not a valid member of Workspace "Workspace" - Server - SkipStagePurchaseHandler:16
The script is :
Code:
local mps = game:GetService("MarketplaceService")
local devProductID = 1162879127
mps.ProcessReceipt = function(purchaseInfo)
local plrPurchased = game.Players:GetPlayerByUserId(purchaseInfo.PlayerId)
if not plrPurchased then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if purchaseInfo.ProductId == devProductID then
local currentCheckpoint = string.split(game.Workspace.CurrentCheckPoint.Name, "Checkpoint:")
local nextCheckpoint = currentCheckpoint[1]..currentCheckpoint[2] + 1
plrPurchased.Character.HumanoidRootPart.CFrame = game.Workspace:FindFirstChild(nextCheckpoint).CFrame
plrPurchased.Team = game.Teams.UrTeam
end
plrPurchased:LoadCharacter()
return Enum.ProductPurchaseDecision.PurchaseGranted
end