How to make player auto move forward

i wanna make it so the player automatically moves forward, and if the player presses w or moves joystick up, it wont effect the move forward thing, and they can look around to change direction

local parts = game.Workspace.Parts:GetChildren()

local Humanoid = script.Parent

for _,part in pairs(parts)
    Humanoid:MoveTo(part.Position)
    Humanoid.MoveToFinished:Wait()
end

i meant move forward without any external parts

example pac man, u auto move forward and can change direction, like that but 3d

Easy enough … no brakes!
Took the keys out of this and just followed the .LookVector with a constant foward push.
So you turn by loooking that way.

local player = game.Players.LocalPlayer
local humanoid = player.Character:WaitForChild("Humanoid")
local camera = workspace.CurrentCamera

game:GetService("RunService").RenderStepped:Connect(function()
	local forward = Vector3.new(camera.CFrame.LookVector.X, 0, camera.CFrame.LookVector.Z).Unit
	humanoid:Move(forward)
end)

thx this works but, are u moving for other players too bcuz this is local?

If you make that a local script for everyone … yes.

1 Like