Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

how to make a randomly moving script? [closed]

Asked by 8 years ago

I tried it alot and i m making a game where NPC's move randomly and we have to kill them. I was thinking any of u guys might can help :/

Closed as Not Constructive by rexbit, theCJarmy7, and Sublimus

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 8 years ago

This is basically what you would do

while true do
wait(3)
game.Workspace.TestChar.Humanoid:MoveTo(Vector3.new(game.Workspace.TestChar.Torso.Position.X - math.random(-10,10)
game.Workspace.TestChar.Torso.Position.Y
game.Workspace.TestChar.Torso.Position.Z - math.random(-10,10)))
end
Ad