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.
1 | player [ i ] .Character:MoveTo(Vector 3. 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
The humanoid root part is the center of the character model, so just grab its current position.
1 | local character = player [ i ] .Character |
2 | local humanoidRootPart = character:FindFirstChild( "HumanoidRootPart" ) |
3 | if humanoidRootPart then |
4 | character:MoveTo(humanoidRootPart.Position) |
5 | else |
6 | -- the player probably just died and his character got deleted |
7 | end |