> Mods and admins, the title is all about the desc... What is the matter???
Question is title.
So i have a problem, this is the part that it runs and doesn't work:
function GetNewAxisX(pl)
if pl~=nil then
if pl.Character then
if pl.Character:findFirstChild('Head')~=nil then
if pl.Character:findFirstChild('Head'):IsA('BasePart') then
return pl.Character.Head.Rotation.Z / pl.Character.Head.Rotation.X
end
end
end
end
end
Before you ask... YES, Variable 'Part' is a part, this is a script (Localscript isn't the problem).
The script is supposed to when we mouselock it appears in-front of our head (even when were not mouselocking)
any help?

2 comments
Actually, findFirstChild always worked for me and still works, and i used 'if head isnt nil' because this is a script that always runs that function, wich means if theres no detector and player dies the script would fully break... Anyway thank you for helping!
findFirstChildworks, it's just not consistent with everything else, so it's a bit prettier to switch. The check for the existence of Head is a good idea -- you just don't need it the second time, and you probably don't need the BasePart check.