Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

lookvectror isnt a valid member?

Asked by 3 years ago

i am making a slide mechanic and i get the error in the title pls help this is my script

local uis = game:GetService("UserInputService")
local char = script.Parent

local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://6836874114"

local keybind = Enum.KeyCode.LeftControl
local cs = true

uis.InputBegan:Connect(function(input,gameprocessed)
    if gameprocessed then return end
    if not cs then return end

    if input.KeyCode == keybind then
        cs = false

        local playanim = char.Humanoid:LoadAnimation(anim)
        playanim:Play()

        local slide = Instance.new("BodyVelocity")
        slide.MaxForce = Vector3.new(1,0,1) * 30000
        slide.Velocity = char.HumanoidRootPart.LookVector * 100
        slide.Parent = char.HumanoidRootPart

        for count = 1,8 do
            wait(0.1)
            slide.Velocity *= 0.7       
        end
        playanim:Stop()
        slide:Destroy()
        cs = true
    end
end)
1
use “HumanoidRootPart.CFrame.LookVector” Speedmask 661 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Just like SpeedMask said in the comments

You can only use Instance.CFrame.LookVector

again all credit to SpeedMask

Ad
Log in to vote
0
Answered by 3 years ago

oh well i solved it myself before anyone answered LOL

Answer this question