What do you want to achieve? Keep it simple and clear!
Make something, known as smilers, go to a CFrame position with parts.
What is the issue? Include screenshots / videos if possible!
I keep getting this:
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
There are no solutions on this, i even checked the tutorial that teached how to do this.
Also here is the script:
attacks[1] = function()
local losers = {}
for i = 1,2 do
local smiler = game.ServerStorage.Monster:Clone()
table.insert(losers, smiler)
smiler.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.MonsterWaypoints:FindFirstChild("Part"..i).Position + Vector3.new(0,3,0))
smiler.Parent = workspace
end
task.wait(10)
for i,v in pairs(losers) do
v:Destroy()
end
end
A part inside that folder called maybe “Part1”, “Part2” etc?
Cause the output is telling you that its not possible to get .Position from that part, possibly doesnt exist, or the name is not correct, or one of the parts are missing
Nope, a part can be called whatever you wish, that was not the problem.
The issue was, that you are running a loop twice, each time the function repeats its looking for a part in that folder, a part called “Part” plus the number of the iteration (repetition), 1, 2, 3 etc
That means per each repeat that number increase, and the parts in folder should be named exactly as what the loop is looking for “Part1”, “Part2”.