# Diagonal Body velocity camera problem

Im trying to make it so when you dodge you go directly to the right, but while i’m shift locked it goes diagonal.

The reason why i’m using camera is so you can also do stuff like this

``````local camangle =  CFrame.new(Vector3.new(cam.CFrame.p.X,char.HumanoidRootPart.Position.Y,cam.CFrame.p.Z),char.HumanoidRootPart.Position) *CFrame.Angles(cam.CFrame.lookVector.Y, 0, 0)
bv1.MaxForce = Vector3.new(14000,14000,14000)
bv1.Parent = player.Character.HumanoidRootPart
bv1.Velocity = (camangle * bv1.Velocity = (camangle * CFrame.Angles(0,math.rad(-90),0)).lookVector *40
for i=1,10 do
wait(0.02)
local camangle =  CFrame.new(Vector3.new(cam.CFrame.p.X,char.HumanoidRootPart.Position.Y,cam.CFrame.p.Z),char.HumanoidRootPart.Position) *CFrame.Angles(cam.CFrame.lookVector.Y, 0, 0)
bv1.Velocity =  (camangle * CFrame.Angles(0,math.rad(-90),0)).lookVector *40
``````

But I’m trying to make it so if you just look forward it’ll bright you just to the right instead of right and forward diagonal

Thanks

Did you mean to say it goes diagonal when NOT in shift lock mode?

EDIT: Wait, I see what you mean now.

I tried but it doesn’t update fast

``````char = script.Parent

cam = workspace.CurrentCamera

while true do

wait(3)

bv1 = Instance.new(&quot;BodyVelocity&quot;)

bv1.MaxForce = Vector3.new(14000,14000,14000)

for i=1,100 do

wait()

local angle = char.HumanoidRootPart.CFrame.LookVector

newangle = Vector3.new(angle.Z*-1,0,angle.X)

bv1.Velocity = newangle*50

bv1.Parent = char.HumanoidRootPart

end

bv1:Remove()

end``````

Fixed by using things like rightvector and lookvector instead credit to @Ferm1llion

1 Like