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)
Just like SpeedMask said in the comments
You can only use Instance.CFrame.LookVector
again all credit to SpeedMask