lookVector is not a valid member of Part "Workspace.portalj123.HumanoidRootPart"

I’m trying to make a Slide system. However when attempting to use it I keep getting the error mentioned in the title, I tried checking it for spelling mistakes but I’m pretty sure there are none.

 local IsActive = false
local UIS = game:GetService("UserInputService")
Anim = script:WaitForChild("DodgeAnim")
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character
local Hum = Character.Humanoid
local lod = Hum:LoadAnimation(Anim)

UIS.InputEnded:Connect(function(input,isTyping)
    if isTyping then
        return
    elseif input.KeyCode == Enum.KeyCode.C then
        if IsActive == false then
            IsActive = true
            lod:Play()
            
            local slide = Instance.new("BodyVelocity")
            slide.MaxForce = Vector3.new(1,0,1) * 30000
           --part with error
            slide.Velocity = Character.HumanoidRootPart.lookVector*100
           --                                                                              ^^^
            slide.Parent = Character.HumanoidRootPart
            
            for count = 1,8 do
                wait(0.1)
                slide.Velocity *= 0.7
            end
            slide:Destroy()
            IsActive = false
        else
        print("you already dashin my bro")
        end
    end
end)
1 Like

Try

 slide.Velocity = Character.HumanoidRootPart.CFrame.lookVector*100

look vector is a property of CFrame, not directly of the part

1 Like

oh snap it worked! thanks i did not know that