game.Players.PlayerAdded:Connect(function(X)DataManger.AddPlayerData(X)X.CharacterAdded:Connect(function(F)local e=F:WaitForChild("\072\117\109\097\110\111\105\100")e.JumpPower=0 e.JumpHeight=0 if X.Data.spawnpoint.Value~=""then local e=F:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local D=workspace.Interactions.Checkpoints:FindFirstChild(X.Data.spawnpoint.Value)if D then task.wait(.5)e.CFrame=D.Root.CFrame*CFrame.new(0,3,0)else warn("\078\079 \067\072\069\067\075\080\079\073\078\084 \070\079\085\078\068 \087\073\084\072 \084\072\069 \078\065\077\069\058 "..(X.Data.spawnpoint.Value.." \068\073\068 \089\079\085 \083\069\084 \085\080 \065 \067\072\069\067\075\080\079\073\078\084 \087\073\084\072 \084\072\065\084 \078\065\077\069\063"))end end end)end)game.Players.PlayerRemoving:Connect(DataManger.RemovePlayerData)

game.Players.PlayerAdded:Connect(function(player)
	DataManger.AddPlayerData(player)
	--this function runs when your player is added to the world, it also runs again when you reset
	player.CharacterAdded:Connect(function(char)
		
		--this is called the player humanoid, it handles a lot of things like animations, jumping, walkspeed
		local humanoid = char:WaitForChild("Humanoid")
		
		
		--this is setting your jump power to 0, too disable player jumping!
		humanoid.JumpPower = 0
		humanoid.JumpHeight = 0
		
		--this is handling for teleporting players to the checkPoints :)
		if player.Data.spawnpoint.Value ~= "" then
			local rootPart = char:WaitForChild("HumanoidRootPart")
			
			local foundCheckpoint = workspace.Interactions.Checkpoints:FindFirstChild(player.Data.spawnpoint.Value)
			
			if foundCheckpoint then
				task.wait(.5)
				
				rootPart.CFrame = (foundCheckpoint.Root.CFrame * CFrame.new(0,3,0))
			else
				warn("NO CHECKPOINT FOUND WITH THE NAME: "..player.Data.spawnpoint.Value.." DID YOU SET UP A CHECKPOINT WITH THAT NAME?")
			end
			
		end
		
	end)
end)

game.Players.PlayerRemoving:Connect(DataManger.RemovePlayerData)
