Why self isn't worked when I tried get HumanoidRootPart or another parts?

I don’t see this question. But here is:

local hit = self:RayCast(humanoidRootPart.Position, target.HumanoidRootPart.Position - humanoidRootPart.Position, 500, {self.brutez})

if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild(“Torso”) and hit.Parent.Torso.Transparency <= 0.6 and hit.Parent:FindFirstChild(“Head”) then
return true
else
return false
end In Module Script