Hi, thanks for you Coming. So what I am trying to do is to make a checkpoint. I have already completed most of the works but got stuck on how to cancel other checkpoints when you hit a checkpoint. I do NOT need the answer of how to make a checkpoint, I am just trying to do it in a different way.

Here is my code:

game.Players.PlayerAdded:connect(function(player)
	local spawn = false
	script.Parent.Touched:connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name == player.Name then
			spawn = true
		end
	end)
	player.CharacterAdded:connect(function(character)
		if spawn == true then
			wait()
			character.HumanoidRootPart.CFrame = CFrame.new(script.Parent.Position.X,script.Parent.Position.Y+5,script.Parent.Position.Z)
		end
	end)
end)

3 comments

0

all i got to say to this is, oml

0

Yeah I tried to explain to him before. He just posted the same code with a different question..

0

umm, I mean, the code works now but...