Problems With Raycasting While Falling

So I have been hard at work with my wall sliding BUT There has been a BIG Problem.

The Issue is that when you jump off the part the raycast doesn’t work - Leading to the Animation Breaking, The Gravity Breaking, Particles…

I have tried solutions like:

if raycastResult and Enum.HumanoidStateType.Freefall then

end
if Enum.HumanoidStateType and LoadedWallSlideAnim.IsPlaying == false then

end

HELP IS APPRECIATED A TON

Raycasts return whatever they hit. If it is not working, then it is most likely not hitting anything.

I don’t really know what direction you are shooting the raycast, but if it is down and the player is falling the raycast might not hit anything depending on the situation.

These links might help:

  1. Intro to Raycasting
  2. WorldRoot:Raycast

The raycast is not down and is look vector of Humanoid Root Part

local origin = HumanoidRootPart.Position
local direction = HumanoidRootPart.CFrame.LookVector * 1

And I have checked those links countless times and couldn’t find an answer

Thanks for your attempt though