So, I made a parkour map that relies on a checkpoint system that is team based. I have no idea how to set up a skip script for that kind of system. I checked around online everywhere and most systems use just int values in their Leaderstats with ‘Stages’ +1 but since I’m team based it won’t work that way.
The closest of an answer I got was on here, someone also had same issue, answer was to add a a IntValue inside the checkpoints on the map. so I have in each one but how would I link it to leaderstats? or what should I do after.
local checkpoints = game.Workspace:WaitForChild("Checkpoints"):GetChildren()
for i, checkpoint in pairs(checkpoints) do
checkpoint.TeamColor = game.Teams:FindFirstChild(checkpoint.Name).TeamColor
checkpoint.BrickColor = game.Teams:FindFirstChild(checkpoint.Name).TeamColor
end
and
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("ObbyDataStore")
game.Players.PlayerAdded:Connect(function(player)
local data
local success, errorMessage = pcall(function()
data = DataStore:GetAsync(player.UserId.."-stage")
end)
if success then
if data then
player.Team = game.Teams[data]
else
player.Team = game.Teams.Lobby
end
else
player.Team = game.Teams.Lobby
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local teamName = player.Team.Name
DataStore:SetAsync(player.UserId.."-stage",teamName)
end)