#Moving NPCS

1 messages · Page 1 of 1 (latest)

alpine field
#

Hello, So I want to move my NPC's to different positions but in any order NOT Specific, I want to Store the Positions in a table, I am new to LUA I have some knowledge however, But not with tables I opened up a new studio place and placed 3 parts and a rig, I just need help from someone to be able to make this possible for a game I am creating.

stiff beacon
#

if you want it to you can use humanoid:MoveTo() and set the position your moving to to a vector3

#

so like

#
humanoid:MoveTo(Vector3.new(0,0,0)
``` this moves the humanoid to origin
#

if you want to bind it to when it ends

#

use humanoid.MoveToFinished

#
function MoveTo(v)
  humanoid:MoveTo(Vector3.new(v))
end
for i,v in pairs(tbl) do
  humanoid:MoveTo(Vector3.new(v))
  repeat task.wait(0.05) until humanoid.MoveToFinished 
end```
#

heres an example if you want to move it to it