Hello, i am working on a obby, i finished it and want to make a skip stage with it and i am trying to figure out why it isnt working.
skip stage starts at the --skip stage
Script:
local marketplaceservice = game:GetService(“MarketplaceService”)
marketplaceservice.ProcessReceipt =function(purchaseInfo)
local plr = game:GetService(“Players”):GetPlayerByUserId(purchaseInfo.PlayerId)
if purchaseInfo.ProductId == 684859645 then – skip to end
– Add the event that will happen when you purchase the dev product.
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -13.1) – checkpoint 1, spawn
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -85.4) – checkpoint 2
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -148) – checkpoint 3
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -204.8) – checkpoint 4
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -270.6) – checkpoint 5
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -368.4) – checkpoint 6
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -399.4) – checkpoint 7
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -474.2) – checkpoint 8
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -523) – checkpoint 9
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -564.999) – checkpoint 10
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -619.799) – checkpoint 11
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -648.799) – checkpoint 12
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -697.799) – checkpoint 13
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -773.798) – checkpoint 14
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -832.598) – checkpoint 15
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -883.398) – checkpoint 16
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -921.397) – checkpoint 17
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 180.3, -925.798) – checkpoint 18
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 180.3, -986.397) – checkpoint 19
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 180.3, -1054.596) – checkpoint 20
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 180.3, -1083.797) – checkpoint 21
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 180.3, -1126.598) – checkpoint 22
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 204.7, -1150.798) – checkpoint 23
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 228.7, -1201.198) – checkpoint 24
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 263.7, -1224.198) – checkpoint 25
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 263.7, -1313.198) – checkpoint 26
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 236.7, -1362.399) – checkpoint 27
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 236.7, -1404.398) – checkpoint 28
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 251.9, -1422.598) – checkpoint 29
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 125.5, -1590) – checkpoint 30
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 125.5, -1641.6) – checkpoint 31
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 125.5, -1674.801) – checkpoint 32
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 125.5, -1787.002) – checkpoint 33
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -1834.602) – checkpoint 34
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -1885.402) – checkpoint 35
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -1944.404) – checkpoint 36
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2007.805) – checkpoint 37
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2059.807) – checkpoint 38
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2116.208) – checkpoint 39
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2167.41) – checkpoint 40
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2218.21) – checkpoint 41
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2285.611) – checkpoint 42
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2338.012) – checkpoint 43
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2396.412) – checkpoint 44
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2457.213) – checkpoint 45
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 87.1, -2518.413) – checkpoint 46
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 122.5, -2592.012) – checkpoint 47
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 122.5, -2644.414) – checkpoint 48
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 122.5, -2741.815) – checkpoint 49
wait(.3)
plr.character.Torso.CFrame = CFrame.new(-2, 122.5, -2830.016) – checkpoint 50
wait(.3)elseif purchaseInfo.ProductId == 684855556 then – skip stage
if plr.leaderstats.Level == 1 then
plr.character.Torso.CFrame = CFrame.new(-2, 5.1, -85.4)end
end
end
also no error.
thanks
(also if you need extra details just say so)
update:
It works now, thanks to everyone who helped!