I want to make a system where it forces you to move forward. You can still change direction, but just never stop walking. How would I do this?
1 Like
Use Humanoid:Move()
to have the Humanoid walk in a forward direction. You also want to have relativeToCamera
set to true so that it’s possible to change direction with the camera.
For this example or reference, make a LocalScript in StarterCharacterScripts and paste this code:
local char:Model = script.Parent
local starterPlayer = game:GetService("StarterPlayer")
local runService = game:GetService("RunService")
local hum:Humanoid = char:FindFirstChildWhichIsA("Humanoid")
--Set Controls
local computerMovement = Enum.DevComputerMovementMode.Scriptable
local devTouchMovementMode = Enum.DevTouchMovementMode.Scriptable
--System
runService.RenderStepped:Connect(function()
local direction = Vector3.new(0,0,-1) --make the humanoid walk forever
hum:Move(direction,true)
end)
Hope this helps!
1 Like
Thanks so much! This really helped!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.