Player position from client

Is there a way to request a player’s position on the client using the server’s remote function? I’m just worried about exploiters being able to fake a position.

Can’t you just use character:GetPivot().Position on the server? Why do you need a remote for this?

No the server cannot safely request the player’s real position from the client.
Long answer: You can request it, but you cannot trust it.

the position is lagging behind, cause of server delay

Ok, well the response from the client will be delayed in the same way. Using remotes for that will just make your game more vulnerable.

exploiters are stuck at a client level so no matter what anything sent from the client is not safe. NO EXCEPTIONS. if you need the players position and want to reduce server lagback try changing the network ownership use the following for more info

https://create.roblox.com/docs/physics/network-ownership

if you have any more questions let me know

or do Humanoid.RootPart.Position on the server

--ServerScript in ServerScriptService
--Get position when called, just looking for a name
--test = just for this test remove when real
local playerName = "2112Jay" --test
task.wait(6) --test

--create the remote
--get remote was triggered
--local playerName = --send via remote 

local player = game.Players:FindFirstChild(playerName)
if player and player.Character then
	local root = player.Character:FindFirstChild("HumanoidRootPart")
	if root then
		local position = root.Position --validate whatever about that
		print(player.Name.." position: "..tostring(position)) --test
		local formatted = string.format("%.3f, %.3f, %.3f" --test
			,position.X, position.Y, position.Z)
		print("Position:", formatted) --test
	end
end

if not exploiters are way more rare than before so exploiters arent a big deal its just something you have to decide. either you risk exploiters for better position info (just have a moderation team for exploiters or a report feature to reduce cheaters) or you eliminate exploiters but have worsened position info. regardless your best bet is through changing the network ownership

The problem with this would be the huge server delay if you test a part following the rootpart on the server you would see the hitbox is pretty noticeably delayed which i dont think he wants in this case

If you are using a character with a humanoid inside, any position given on the client will auto replicate to the server, so it would be redundant to ask the server to give you a value, that the client is already sending to the server.

if you ask me

this was the longer answer :man_shrugging:

they already can, whether you get it on server, or request it from client, if you want to stop cheating positions, you need anti teleport, anti speed hack detections

What is the use-case here? That could help us help you better

will granting network ownership help exploiters?