So i want to move the player every time he clicks F but instead this works once and then just moves the player to one place. This is a localscript inside StarterCharacterScripts

UIS.InputBegan:connect(function(Input)
    local MouseInput = Input.UserInputType 
    local KeyCode = Input.KeyCode
 
    if KeyCode == Enum.KeyCode.F then
      plr.Character.HumanoidRootPart.CFrame = 					 
      CFrame.new(plr.Character.Head.CFrame.lookVector * 15)
    end
end)

3 comments

0

What is the use of "Head.CFrame.lookVector" in this?

0

I want to move in the direction the character is looking

0

Do you want the character to constantly move forward?