This is the code i used.

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)

2 comments

0

I'm sorry could you explain what you mean by "The one I use takes 2-120 minutes to respawn"?

0

Okay, what I mean is when you die, it will put you at spawn and then wait for a long time to take you back to the checkpoint you were at. Thank you for asking.