Obby Checkpoints Script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a difficulty-chart type obby with a leaderstats checkpoint system.
  2. What is the issue? Include screenshots / videos if possible!
    I don’t know how to make a player spawn at a specific SpawnLocation without Teams…
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have a leaderstats script with DataStoreService… it saves your stage…

I want to have scripts that:
-Update stage once the player touches a block.
-Have the player respawn at their stage’s SpawnLocation.

If I can expand my current script, that would be great, but I can create new scripts, too.

Note: I do NOT want to use a team for every single stage, as my obby will be very long.

This is my current leaderstats script:

	-----------------------Variables/Setup--------------------------------

local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("LevelSaveSystem")

-------------------Data Saving System-----------------------------

game.Players.PlayerAdded:connect(function(player)
	local leaderstats = Instance.new("Folder", player)
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	
	local Level = Instance.new("IntValue", leaderstats)
	Level.Name = "Level"
	Level.Value = ds1:GetAsync(player.UserId) or 0
	ds1:SetAsync(player.UserId, Level.Value)
	
end)

--update data saves

game.Players.PlayerRemoving:Connect(function(player)
	
	ds1:SetAsync(player.UserId, player.leaderstats.Level.Value)
	print ("saved data")
	
end)


Thanks for your help!

1 Like

I highly recommend this tutorial by @xuefei123, as it has helped me in the past:

1 Like