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

How do you make a checkpoint and stage counter system?

Asked by
goodlead -62
3 years ago
Edited 3 years ago
game.Players.PlayerAdded:Connect(function(Player)
 local Ls = Instance.new('IntValue',Player)
 Ls.Name = 'leaderstats'
 local Level = Instance.new('IntValue',Ls)
 Level.Name = 'Level'
 Level.Value = 1
 Player.CharacterAdded:Connect(function(Character)
  repeat wait() until Character ~= nil
  local Stage = game.Workspace.Stages:FindFirstChild(Level.Value)
  Character:WaitForChild('HumanoidRootPart').CFrame = Stage.CFrame + Vector3.new(0,5,0)
 end)
end)


Will this 2018 code work?

0
I don't see why it wouldn't, do you have an error? TaxesArentAwesome 514 — 3y
1
No, it is just because it is a 2018 script. goodlead -62 — 3y
0
There are some depreciations in the code though. You can change "connect" to Connect DarkDanny04 407 — 3y
1
? goodlead -62 — 3y
1
Oh okay I get it. goodlead -62 — 3y

1 answer

Log in to vote
0
Answered by
iivSnooxy 248 Moderation Voter
3 years ago

Yes that’s exactly how you could do it goodlead.

Here


game.Players.PlayerAdded:Connect(function(Player) local Ls = Instance.new('IntValue',Player) Ls.Name = 'leaderstats' local Level = Instance.new('IntValue',Ls) Level.Name = 'Level' Level.Value = 1 Player.CharacterAdded:Connect(function(Character) repeat wait() until Character ~= nil local Stage = game.Workspace.Stages:FindFirstChild(Level.Value) Character:WaitForChild('HumanoidRootPart').CFrame = Stage.CFrame + Vector3.new(0,5,0) end) end)
Ad

Answer this question