So, Im trying to make the ray casting that go towards an part, To go to the right side instead of just foward, I tried using vector3.new like this
local Part = plr.Character.HumanoidRootPart local rayDetector = Ray.new(Part.CFrame,Part.CFrame.LookVector * Vector3.new(3,0,-5)) local DetectedPart = workspace:FindPartOnRay(rayDetector , plr.Character) if DetectedPart then print("Output is " .. DetectedPart.Name ) end
But when i tested it Instead of going from side to the caracter, It dont detects on where the character root part is looking, It detects on another direction I dont know how to fix it