-
What do you want to achieve?
Basicly I Need A Ray To Cast From An Attachment’s Position And Orientation So It Checks If There Will Be Something In A Way So It Doesn’t Overlap -
What is the issue?
its just facing 1 way no matter what

-
What solutions have you tried so far?
Making The Ray Use Actual Orientation Of The Attachment But Than It Doesn’t Work At All
local RayOrigin1 = attachment2.WorldPosition
local RayDirection1 = attachment1.WorldCFrame.LookVector
print(RayDirection1)
local Length = newpart.Size.Z
--[[local viualiser = Instance.new("Part")
viualiser.Parent = game.Workspace
viualiser.Material = "Neon"
viualiser.Anchored = true
viualiser.Size = Vector3.new(0.25,0.25,Length)
viualiser.Position = RayOrigin1+Vector3.new(0,0,Length/2)
viualiser.Orientation = RayDirection1--]]
local resultZ = workspace:Raycast(RayOrigin1, RayDirection1 * Length)
local Width = newpart.Size.X
local resultX = workspace:Raycast(RayOrigin1+Vector3.new(0,0,Length/2), RayDirection1 * Width)
