Hi. I want to achieve a basic ai script that moves only left to right. I found this in one of my old models. Here is the script:
> local character = script.Parent
> local humanoidRootPart = character:WaitForChild('HumanoidRootPart')
> local humanoid = character:WaitForChild('Humanoid')
>
> local base = character.Parent.Parent.Base
>
> local step = 2
>
> while wait(step) do
> humanoid:Move(Vector3.new(math.random(base.Position.X), 0, math.random(base.Position.Z)))
> end