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

Why does this make the player walk to the wrong position?

It moves the player to 0,0,0

while wait(5) do
Mouse=game.Players.LocalPlayer:GetMouse()
print(Mouse.Origin.p)
Pos=Mouse.Origin.p
game.Players.LocalPlayer.Character.Humanoid.WalkToPoint=Vector3.new(pos)
end


1 answer

✓ Accepted answer

Two things

  1. in game.Players.LocalPlayer.Character.Humanoid.WalkToPoint=Vector3.new(pos) pos isn't capitalized, so it thinks it is another variable.

  2. Pos is already a Vector3, so you don't need it to be in a Vector3.new

You just need to change the line to game.Players.LocalPlayer.Character.Humanoid.WalkToPoint=Pos

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