of     1   

krisk7
#143354207Tuesday, August 12, 2014 4:51 AM GMT

So I made a checkpoint system where basically you touch the checkpoint and you die, then you respawn back at that checkpoint. What I was wondering is, is it possible to have a checkpoint named 2 but when the player died he respawns at another checkpoint named 2b instead of the one named 2. Is that possible? Here's the checkpoint system script: 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("gah") 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) And here's the script that's put into each of the checkpoints: 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)
krisk7
#143418354Tuesday, August 12, 2014 10:42 PM GMT

So is it possible?
cntkillme
#143425425Tuesday, August 12, 2014 11:55 PM GMT

Yes, but of you need some way to track if they are on 'b' or not. A simple way would just name the part 2b and anytime they touch a part, some StringValue gets set to the name
krisk7
#143444178Wednesday, August 13, 2014 3:25 AM GMT

I have a spawn named 2b but I'm not sure where I'm supposed to tell the script to respawn at spawn 2b instead of 2. I've tried modifying the script but everytime the leaderboard just says 0 as my stage and doesn't respawn me at the checkpoint.

    of     1