Basically I have been having some problems with checkpoints. Don't you know the way most obby nowadays have like stage 1 and 2 and 3 etc I have been trying to do this but I just don't know where to start I know Scripting helpers is for help and not for asking people to make stuff for you but you don't have to make it for me just explain how it would work and I will figure out the rest on my own. Any kind of help would be much appreciated.
✓ ANSWER ACCEPTED
CheckPoints
2 answers
✓ Accepted answer
Ok, so I have made many obbies in my roblox times so yeah.
Make a script, name it leaderboard and put this code in:
function oa(object)
local player = game.Players:playerFromCharacter(object)
if player ~= nil then
local ls = player.leaderstats
local sl = game.Workspace:FindFirstChild(ls.Stage.Value)
print("obby")
object.Torso.CFrame = object.Torso.CFrame + Vector3.new(0,3,0)
wait()
object.Torso.CFrame = sl.CFrame + Vector3.new(0,3,0)
end
end
function oe(object)
if object.className == "Player" then
local ack = Instance.new("IntValue")
ack.Name = "leaderstats"
local ack2 = Instance.new("IntValue")
ack2.Name = "Stage"
ack2.Value = 1
ack2.Parent = ack
ack.Parent = object
end
end
game.Players.ChildAdded:connect(oe)
game.Workspace.ChildAdded:connect(oa)
Then make a brick and name it "1" and insert this script into the block:
function ot(hit)
if hit.Parent ~= nil then
local player = game.Players:playerFromCharacter(hit.Parent)
if player ~= nil then
if player.leaderstats.Stage.Value == script.Parent.Name - 1 then
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
if h.Health ~= 0 then
player.leaderstats.Stage.Value = script.Parent.Name
end
end
end
end
end
end
script.Parent.Touched:connect(ot)
Now this script was not made by me, I believe Person299 made it, I have just memorized it since I have used it sooooo much. Now to make stage 2, 3, 4, 5, etc. Just copy brick 1 and rename it to 2, 3, 4, 5, and so on.
I hope this helped you on your obby.
ggggggggggggggggggggggg//////////////ggggggggggggggggggggggggggg////////////////////////////
1 comment
0
why wont checkpoint 3 not work? like when i use checkpoint 3, die it puts be back to regular spawn, pls help
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
THANK YOUU :)))