Try using a physics force and only register input from the W, for example a power value and holding W will set the power value, and use the camera to indicate direction while multiplying by the power?
Here is how you can do that
If you want the player not able to change camera position then set AutoRotate to false
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local hrp = character:WaitForChild("HumanoidRootPart")
RunService.RenderStepped:Connect(function()
if humanoid and hrp then
local moveDir = humanoid.MoveDirection
local forwardDir = hrp.CFrame.LookVector
local dot = moveDir:Dot(forwardDir)
if dot <= 0.5 then
humanoid:Move(Vector3.zero, false)
end
end
end)