How to teleport players while they are sitting down?

So my script can teleport players normally, however, if someone is sitting down inside my lobby they do not get teleported?

spawns = gameChosenClone.Spawns:GetChildren()
wait()
for i, v in pairs(game.Players:GetPlayers()) do
	name = v.Name
	check = game.Workspace:FindFirstChild(name)
	if check then
		checkHumanoid = check:findFirstChild("Humanoid")
		if checkHumanoid then
		v.Character:MoveTo(spawns[i].Position)
		collectionservice:AddTag(v.Character, "Alive")
2 Likes

You can’t CFrame a player’s character while they’re in the Sitting state Which is what you’re doing
v.Character:MoveTo(spawns[i].Position) All you have to do is change their state which can be easily done by doing the following,

spawns = gameChosenClone.Spawns:GetChildren()
wait()
for i, v in pairs(game.Players:GetPlayers()) do
	name = v.Name
	check = game.Workspace:FindFirstChild(name)
	if check then
		checkHumanoid = check:FindFirstChild("Humanoid")
		if checkHumanoid then
         checkHumanoid.Sit = false
		v.Character:MoveTo(spawns[i].Position)
		collectionservice:AddTag(v.Character, "Alive")
3 Likes

You can just make them jump or turn Sit false like Obscure suggested.

You can change the HumanoidRootPart’s CFrame.

This would not work well, as the character would still be sitting, and would have to jump to fix the problem. Yes it would break the weld, but Humanoid.Sit would still be true, making the player prone to falling over weirdly. The best method is to set Humanoid.Sit to false, and then set the cframe or :MoveTo() the character.

1 Like