Title says it all, here's the code I currently have as well as a video for visual representation of what it looks like, please help!
local rayParams = RaycastParams.new() rayParams.FilterType = Enum.RaycastFilterType.Blacklist rayParams.FilterDescendantsInstances = {Character} local ray = workspace:Raycast(Character['HumanoidRootPart'].Position, Character['HumanoidRootPart'].CFrame.LookVector * 25,rayParams) VisibleRay(Ray.new(Character['HumanoidRootPart'].Position, Character['HumanoidRootPart'].CFrame.LookVector * 25)) if ray then local Hit,Position = ray.Instance,ray.Position if Hit.Parent:FindFirstChildOfClass('Humanoid') then Character['HumanoidRootPart'].CFrame = Hit.CFrame - Character['HumanoidRootPart'].CFrame.lookVector * 5 else Character:MoveTo(Vector3.new(Position.X,Character['HumanoidRootPart'].Position.Y,Position.Z)) end else Character['HumanoidRootPart'].CFrame = Character['HumanoidRootPart'].CFrame + Character['HumanoidRootPart'].CFrame.lookVector * 25 end