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

Moving only the Torso/HumanoidRootPart and not the character?

Basically when you spawn in it is supposed to move/teleport your character in a different location of game. (Example where you came from), first it wasn't working at all now it is working thanks to the last question I asked.. But, it's only moving the torso if I say Torso. If I say Humanoid it says it isn't valid and if I say HumanoidRootPart it just moves the humanoidrootpart and not the whole player itself.

local Data = game:GetService("TeleportService"):GetLocalPlayerTeleportData()

print (Data)

if Data then
	wait(.5)
	game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
    game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(-227.2, 150.2, -236.2)
end

1 answer

✓ Accepted answer

You cannot move a player/NPC using a Vector3 value, you need to use a CFrame value, otherwise it will only change the HumanoidRootPart's position and it won't affect the other player parts, using a CFrame value you'll be changing the HumanoidRootPart's CFrame position and that will affect all of the other player parts.

Try changing this:

game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(-227.2, 150.2, -236.2

To this:

game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-227.2, 150.2, -236.2)

And see if it works.

1 comment

0

Thank you so much, I didn't know that. Only you and one other guy were really helpful. The other people I asked on the discord were toxic, so this means a lot.

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