Hiya, apologies for the late response. This is a representation of what I’m trying to do:

From a script inside of the part, I want to fire a ray cast downwards and detect when this ray cast hits the beam, so that I can get the exact y-value of the beam. (The beam is slanted and moving, if that has an effect). The diagram does kind of misrepresent it in a 3D world, the ray cast will be fired directly above the part and fired down (with the parts parent’s descendants blacklisted), and I want to detect the y value of the beam at the parts exact position.
This is what I’ve tried:
while wait() do
local rayOrigin = shipController.Position + Vector3.new(20,20,0)
local rayDirection = Vector3.new(0,-100,0)
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {shipController.Parent}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local ray = Ray.new(rayOrigin, rayDirection)
local raycastResult = workspace:FindPartOnRayWithIgnoreList(ray, {shipController.Parent})
local hitPart = raycastResult.Position
print(hitPart)
end
And also I tried:
while wait() do
local rayOrigin = shipController.Position + Vector3.new(20,20,0)
local rayDirection = Vector3.new(0,-100,0)
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {shipController.Parent}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local raycastResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)
local hitPart = raycastResult.Position
print(hitPart)
end
Both output nil.
Both are similar, just using different raycasting. The ray isnt directly above, but when it is, it still outputs nil as the raycastResult.
I’ve also just tried a simple touch function, but that doesnt output the beam (I didnt expect it too).
So is it possible to find a beam on ray casts? Similar to what I’m saying. I never thought it was, but it’s the fact I see people talking about detecting beams on ray casts.
And again, sorry for the late response!
Thank you!
EDIT
The beam is constantly there, attached between two attachments in two different parts, and these two parts are moving up and down horizontally. The two parts begin on the same y coordinate, and move up and down pretty much in sync (one moves up, one moves down, then they switch so the one going down starts going up, it’s simulating a wave) with each other! Sorry about the lack of transparency with what I’m trying to achieve.