Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a skip stage script using Teams as IntValues in Roblox?

Asked by 3 years ago

I started making an obby and basically made it using the system in alvin blox's youtube video which is based on teams. Where when the player moves on to the next spawn point he changes to that team and that team color. I've scripted the button, the remote event, and the start of the script in ServerScriptService.

this is the script

local MarketplaceService = game:GetService("MarketplaceService")

local players = game:GetService("Players")

local productID = myproductid

local function processReceipt(receiptInfo)

local player = players:GetPlayerByUserId(receiptInfo.PlayerId)

if not player then
    return Enum.ProductPurchaseDecision.NotProcessedYet

end
if player then




    end

-- where it says "if player then"

i know i'm supposed to write the code inside here of what i want it to do. To put it simply, i want the player to jump from one team to the next team (skip stage) using intvalues which are assigned to the team. I guess my question would be is this even possible? Is there a way to do this without using leaderstats. I've tried about 15 differen't leaderstats scripts and none seem to work. Around 10 of those had no scripting errors and still didn't teleport the players.

i just want to know if a player can be teleported using intvalues like 1 2 or 3, set to a Team. Thanks for any help. My teams are named Level1 Level2 Level3 etc. I don't want to change the name of the Team, i would rather set an IntValue to it and try to get the player to move to the level the intvalue is assigned to.

Thanks again for any help.

return Enum.ProductPurchaseDecision.PurchaseGranted

end

Answer this question