Hi! I’m working on a Doctor Strange ability and I’m trying to fire a ray from a part welded to the player’s Right Hand. As you can see, I’m firing it in the Look Vector’s direction, but for some reason when I use it the ray goes right.
Code:
local start = player.Character.IcyTendrils.Flames
local raycastResult = workspace:Raycast(start.Position, start.CFrame.LookVector*500, raycastParams)
if raycastResult then
print("Object/terrain hit:", raycastResult.Instance:GetFullName())
print("Hit position:", raycastResult.Position)
print("Surface normal at the point of intersection:", raycastResult.Normal)
print("Material hit:", raycastResult.Material.Name)
else
print("Nothing was hit!")
end
When I use it:
I’ve rotated the part in every direction. It still hits the part to its right instead of the one in front.
Any help is appreciated.