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

How to get players position everytime?

I was coding a anticheat I want to teleport the player back to its position

2 answers

✓ Accepted answer

Try this in a regular script:

game.Players.PlayerAdded:connect(function(player)
	repeat wait() until player.Character
	while wait() do
		local playerPosition = player.Character.Torso.Position --In here we're using Torso's position
		print(playerPosition) --And the variable is defined! Now we're testing with a simple print()!
	end
end)

If this works, please mark as the solution!

As always, good scripting!

By using a while loop,

-- Change the delay to what ever suits you best.
while wait(1) do
	print(tostring(game.Players.LocalPlayer.Character.Torso.Position))
end

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