Sorry for any English mistakes. I'm trying to do a LongJump script. The script is working but using the CFrame.LookVector doesn't work really well. I tried using the Vector 3 and Cframe,but because I'm really bad at doing it I don't know how to create a Vector 3 that is orientated by where the player is looking.
the Long Jump script.
function LongJump() if CR and debounce2 then CR = false AP = true animTrackLongJump:Play() if animTrackroll.IsPlaying then animTrackroll:Stop() end debounce2 = false humanoid.JumpPower = 20 humanoid:ChangeState(Enum.HumanoidStateType.Jumping) print("longjump") local Root = localPlayer.character:WaitForChild("HumanoidRootPart") Root.Velocity =Root.Cframe.LookVector*(30+humanoid.WalkSpeed*2) repeat wait() animTrackLongJump:Play() animTrackLongJump.TimePosition = 0.100 until humanoid:GetState()== Enum.HumanoidStateType.Landed or humanoid:GetState() == Enum.HumanoidStateType.Jumping animTrackLongJump:Stop() humanoid.JumpPower = 50 debounce2 = true end end