local module = {}
NPCs = script.Parent:WaitForChild("Aliens")
End = script.Parent:WaitForChild("EndPart")
Sweeper = script.Parent:WaitForChild("Sweeper")
function module.mainActivate()
if NPCs and End then
local move = coroutine.wrap(function()
while true do
wait()
Sweeper.Position = Sweeper.Position + Vector3.new(1,0,0)
NPCs.Alien1.Humanoid:MoveTo(End.Position)
NPCs.Alien2.Humanoid:MoveTo(End.Position)
NPCs.Alien3.Humanoid:MoveTo(End.Position)
NPCs.Alien4.Humanoid:MoveTo(End.Position)
NPCs.Alien5.Humanoid:MoveTo(End.Position)
NPCs.Alien6.Humanoid:MoveTo(End.Position)
NPCs.Alien7.Humanoid:MoveTo(End.Position)
NPCs.Alien8.Humanoid:MoveTo(End.Position)
end
end)
move()
end
end
return module
COMMUNITY QUESTION
When I change just the x value with the vector 3 the part randomly is placed higher ?
1 answer
What might be happening is when you use Vector3 for Position, if the part collides with another part, it will default to being above it instead of partially colliding with it. Try using Sweeper.CFrame = Sweeper.CFrame * CFrame.new(1,0,0)
1 comment
0
it works but moves on the z-axis instead of the x-axis
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Could you give more detail as to what you are asking please?