Roblox Forum banner
1 - 3 of 3 Posts

· Registered
Joined
·
32 Posts
Discussion Starter · #1 ·
I get
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
I have my checkpoints in my workspace as "Checkpoint:1" , "Checkpoint:2" and I don't know what the problem is
 

· If you won't let yourself fail, you won't improve
Joined
·
7,260 Posts
You don't have anything in your workspace called CurrentCheckPoint that's what the script is complaining about so instead tried to define Checkpoint1 or Checkpoint2 and see what happens from there.
 
1 - 3 of 3 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top