How do i make it so that when I use path finding service the waypoints will have exact same spacing? I know that there are Agent Parameters that lets you change the waypoint spacing but for some reason it doesn’t work.
local path = PFS:CreatePath({
["AgentCanJump"] = false,
["WayPointSpacing"] = 3,
})
path:ComputeAsync(testPart.Position, base.Position)
local wayPoints = path:GetWaypoints()
for i,waypoint in pairs(wayPoints) do
--rest of the code
For some reason the waypoint spacing are still off.
Well since the character is client-sided, it should replicate no problem.
I think Humanoid:Move and Humanoid:MoveTo are traditionally used for following a path.
I dont quite understand what you mean by “since the character is client-sided, it should replicate no problem.”
Yes humanoid:MoveTo() are usually used with pathfinding, but since my game is client side rendered, the server doesn’t have a character. So instead i use a part and tween the part with pathfinding.
The Distance between waypoints divided by the speed of the character is the time it will take to reach said waypoint (distance/speed = time). You can use that in the TweenInfo and either task.wait(time) or Tween.Completed:Wait() to wait on the tween to complete.
By default, characters are created on the server and updates to the HumanoidRootPart are sent from the cleint to the server and then to other clients. In other words it’s client-owned. This is why character teleport exploits are so common. The client has nearly full control over their own character. This was compromised for quicker character reaction.