Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how to make a randomly moving script?

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 :/

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.