So basically I want to see if the Parent of the part that is touching the ray is named Katana but I don’t know why the script does not work the way i want it to work. It will simply not see that as a Katana.
the script:
local function RayTest()
local RAY = Ray.new(Origin.Position,Origin.CFrame.LookVector*3.284)
local RayPos,HitPos = workspace:FindPartOnRayWithIgnoreList(RAY, IL, false, true)
print(RayPos)
if RayPos then
print("there is a ray pos")
print(RayPos.Parent)
if RayPos.Parent:GetFullName() == "Katana" then
print("It's a katana")
end
end
end
in the output i get this:
KatanaHitbox
there is a ray pos
Katana
but i don’t get the message"It’s a katana"
Thanks,
Tem