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

'Teleport' the player right where their standing? (So they don't move)

Hey guys!

I just want to quickly know to if it is possible to 'teleport' a player into the place they are standing.

This is the script I have so far.

player[i].Character:MoveTo(Vector3.new())

So in the Vector3.new() I need something in the brackets that ensures that the player doesn't move from where they are. (Without this bit of the script, the whole thing breaks so I do need it!)

If anyone has any ideas, please share!

Thanks in advance,

Michael

1 answer

✓ Accepted answer

The humanoid root part is the center of the character model, so just grab its current position.

local character = player[i].Character
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
	character:MoveTo(humanoidRootPart.Position)
else
	-- the player probably just died and his character got deleted
end

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