Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to script with checkpoints and leaderboards?

So I'm new to creating roblox games, i just started. I've been creating an obby, but I don't know 3 things that are pretty important to me: How to get a leaderboard with the stage number, how to get stages to save when you leave, and how to make it so when you go onto a past checkpoint it doesnt save it. I've been looking at other posts, but I can't seem to understand where to put the script, and they're a bit old. If somebody could help me that would be very apreciated.

1 answer

✓ Accepted answer

You should show the script that you attempted to make first next time so we can help and show you how to fix the errors.

most of your scripts could go inside serverscriptservice.

for datastores, you could read this https://developer.roblox.com/en-us/articles/Data-store

to make 'Stages' you make leaderstats https://developer.roblox.com/en-us/articles/Leaderboards

These scripts are not finished (wont work), they only give an idea of how you could make it

to move them to the spawn, you could do somethin like this


	player.CharacterAdded:Connect(function(character) -- runs every time player respawns
		for i,v in pairs(game.Workspace.Stages:GetChildren()) do -- put stages in a folder or something in workspace
			if v.Name == player.leaderstats.Stage.Value then -- finds stage that player is on
				character:MoveTo(v.Position) -- move player to checkpoint
			end
		end
	end)

how you could check if stage is 1 ahead, not more or less.

local stage = ?????
if stage = player.leaderstats.Stage.Value + 1 

This discussion is preserved as it was. New answers, comments, and votes are closed.