Ahh, finally! After about 6 hours of reading I am finally a New Member on the Roblox Devfourm! Let me get on with it now.
Hello! I have this already working bit of code that moves Freddy (an NPC) to Parts in a Folder. Each parts name starts with pos, and I just put numbers adding up at the end of each one. Here is my script:
Freddy = game.Workspace.NPCs.Freddy.Humanoid
fred1 = game.Workspace.FreddyPositions.pos1.Position
fred2 = game.Workspace.FreddyPositions.pos2.Position
fred3 = game.Workspace.FreddyPositions.pos3.Position
fred4 = game.Workspace.FreddyPositions.pos4.Position
fred5 = game.Workspace.FreddyPositions.pos5.Position
fred6 = game.Workspace.FreddyPositions.pos6.Position
fred7 = game.Workspace.FreddyPositions.pos7.Position
fred8 = game.Workspace.FreddyPositions.pos8.Position
Freddy:MoveTo(fred1)
Freddy.MoveToFinished:wait()
Freddy:MoveTo(fred2)
-- on and on and on
(This is my first time putting in a code block so I hope I did it correctly)
This is only a small portion of the full script, but it shows what iām concerned with. All of the variables at the beginning of the script look very messy and I think there is a better way of doing this. I am going to be needing more than just 8 positions so I would like to fix this messiness as soon as possible. Since this is my first ever post here, please tell me if I did something wrong! Thanks!