this should work for what im trying to do, but it doesnt... it doesnt even move one (and yes, if anybody asks, this is in a localscript)
local player=game.Players.LocalPlayer --Get the player
local mouse=player:GetMouse() --Get the mouse
for i,v in pairs (game.Workspace.Units:GetChildren()) do
if v:IsA ("Model") then
mouse.Button1Down:connect(function() --When the player clicks..
v.Humanoid:MoveTo((mouse.Hit).p)
end)
end
end
the script below moves just one unit when 3 is summoned
local player=game.Players.LocalPlayer --Get the player
local mouse=player:GetMouse() --Get the mouse
local warrior=workspace:WaitForChild("Warrior")--Get the warrior
mouse.Button1Down:connect(function() --When the player clicks..
warrior.Humanoid:MoveTo((mouse.Hit).p)
end)
i added workspace.Units to the first one for the getChildren() function
-- thanks in advance for anybody that helps

3 comments
that works. thanks. is there a way to make them not go behind each other though?
Due to collisions, they won't be able to pass through each other, so I'm unsure of how to fix that. And also if this helped you, please remember to click the "Accept Answer" button underneath my name!
i did. and i mean like instead of behind each other, touching, they would be spaced a little