Is this an accurate way to show the players position on the server?

So I’m trynig to experiment with some networking/latency stuff and I wanted to visualize the players position on the server to see like the difference or the delay might be a better term. Although I’m not sure if it’s accurate.

https://i.gyazo.com/fddc9907832c7cdfc1016738d1028e5a.mp4

local function Character()
	local dummy = workspace.R6:Clone()
	
	for _,v in pairs(dummy:GetChildren()) do 
		local hasTransparency = pcall(function() Utils:HasProperty(v, "Transparency") end)
		local hasCanCollide = pcall(function() Utils:HasProperty(v, "CanCollide") end)
		
		if hasTransparency then 
			v.Transparency = 0.6
			v.Color = Color3.fromRGB(0, 255, 127)
			v.CanCollide = false
			--v.Anchored = true 
		end
	end
	
	dummy.Parent = workspace
	dummy.Name = "Server Player"
	
	return dummy
end

Players.PlayerAdded:Connect(function(player)
	warn("[SERVER]: "..player.Name.." connected")
	
	player.CharacterAdded:Connect(function(character)		
		local clone = Character() --dummy 
		
		--set dummy hrp to the players
		RunService.Heartbeat:Connect(function()
			clone.HumanoidRootPart.CFrame = character.HumanoidRootPart.CFrame
		end)
	end)
end)
1 Like

I think this is a way to get intuition about how latency affects player position. About how accurate it is:

  • If you view this dummy on the client then you have the latency from the client to server AND back again when the dummy position is replicated to the client so no it isn’t perfectly accurate.
  • You will get a better idea of it if you use Studio and look from the server PoV but then you have the issue of studio being different from a live server.
1 Like

I’m having trouble understanding your question… Are you asking for the quickest way to fetch all the players’ locations (for things such as player maps)?

Basically from my understanding since Roblox uses a client-server model when the player moves it isn’t instantly updated to the server due to latency and stuff which is why when I move the green one is a bit further behind and the blue one isn’t. The green one is where I am on the server the blue one is just me so tbh it was kind of pointless to make the blue one.

So yeah basically from the video, you can see when I jump and then land even though I landed I’m actually still falling on the server and for everyone else (I’m pretty sure).

and so my question was basically is my code actually accurate at showing this.

You’re using the same code for both the server and the client? Probably yes but just making sure.

Yeah same code. Only difference would
obviously be using Stepped instead of Heartbeat and not needing the PlayerAdded.