Im trying to randomly teleport rigs to a random part. Not sure why it wont work
local waypoints = workspace.PathfindingTest:GetChildren()
print(#waypoints)
local rigs = workspace.Guards:GetChildren()
wait(5)
while wait(1) do
for _,rig in ipairs(rigs) do
local randomWM = math.random(1, #waypoints)
print(randomWM)
local randomW = waypoints[randomWM]
print(randomW.Position)
rig.HumanoidRootPart.Position = randomW.Position
end
end
update:it works on client but on server it just moves the rigs up by a few studs each loop