Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does the player not spawn in the spot I want even when I change their CFrame?

I'm a little confused at the moment. I'm trying to create a checkpoint system and it isn't working. I'm trying to update where the player spawns when they reset/die but for some reason they still spawn at the same default spot over and over.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAppearanceLoaded:Connect(function(char)
		print("CHARACTER APPEARANCE LOADED RAN")
		print("HumanoidRootPart: ", char:WaitForChild("HumanoidRootPart").CFrame)
		
		char:WaitForChild("HumanoidRootPart").CFrame = game.Workspace.TPPart.CFrame
		
		print("HumanoidRootPart: ", char:WaitForChild("HumanoidRootPart").CFrame)
		print("TPP CFRAME: ", game.Workspace.TPPart.CFrame) 

And when I reset the game, the CFrame is changed, I can see it in the print statement. But the player still stays in the spot. Why is that? I don't get it.

1 answer

Ok. I changed line 6 to:

game.Workspace[player.Name].HumanoidRootPart.CFrame = game.Workspace.TPPart.CFrame

And it worked.

This discussion is preserved as it was. New answers, comments, and votes are closed.