checkpoint.Touched:Connect(function(V)if V and(V.Parent and V.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100"))then local V=checkpoint.ParticleEmitter V.Enabled=true wait(.3)V.Enabled=false end end)function onCheckpointTouched(V)if V and(V.Parent and V.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100"))then local S=Players:GetPlayerFromCharacter(V.Parent)local W=ServerStorage:FindFirstChild("\067\104\101\099\107\112\111\105\110\116\068\097\116\097")if not W then W=Instance.new("\070\111\108\100\101\114")W.Name="\067\104\101\099\107\112\111\105\110\116\068\097\116\097"W.Parent=ServerStorage end local A=tostring(S.UserId)local y=W:FindFirstChild(A)if y.Value==script.Parent then script.CheckPointPopup.Enabled=true wait(2)script.CheckPointPopup.Enabled=false end end end
--Make the part when touched enable the "ParticleEmitter" inside of it ad then disable it after 1 second
checkpoint.Touched:Connect(function(hit)
	if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") then
		local emitter = checkpoint.ParticleEmitter
		emitter.Enabled = true

		wait(0.3)

		emitter.Enabled = false
	end
end)

function onCheckpointTouched(hit)
	if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") then
		local player = Players:GetPlayerFromCharacter(hit.Parent)
		local checkpointData = ServerStorage:FindFirstChild("CheckpointData")
		if not checkpointData then
			checkpointData = Instance.new("Folder")
			checkpointData.Name = "CheckpointData"
			checkpointData.Parent = ServerStorage
		end

		local userIdString = tostring(player.UserId)
		local checkpointValue = checkpointData:FindFirstChild(userIdString)

		if checkpointValue.Value == script.Parent then
			script.CheckPointPopup.Enabled = true
			wait(2)
			script.CheckPointPopup.Enabled = false
		end
	end
end
