for _, player in game.Players:GetPlayers() do
local character: Model = player.Character or player.CharacterAdded:Wait() and player.Character
local rootPart: BasePart = character:WaitForChild("HumanoidRootPart", math.huge)
local time: number = 0.2
local part = Instance.new("Part")
part.CanCollide = false
part.Transparency = 0
part.Size = Vector3.new(1, 1, 1)
part.Anchored = true
part.Parent = workspace
local hl = Instance.new("Highlight")
hl.Adornee = part
hl.Parent = part
local prevPos: Vector3 = Vector3.zero
game:GetService("RunService").PostSimulation:Connect(function(dt)
local currPos: Vector3 = rootPart.Position
local velocity = (currPos - prevPos) / dt
prevPos = currPos
part.Position = rootPart.Position + velocity * 0.2
end)
end
Im attempting to predict every players position
In the video, on the screen of the client, the client’s predicted position is smooth and still while other peoples positions are jittering back and forth
Anyone got a fix?