local ply = self.Owner
if not IsValid(ply) then return end
if ply:GetEyeTrace().Entity == my_entity then
print( “Yup, it’s workin!” )
print( ply:GetEyeTrace().Entity )
Here is the code in my swep. I look at the entity called “my_entity”, whiched I spawned in using the console. but for some reason, it won’t work. It will just print ply:GetEyeTrace().Entity which says  my_entity or something similar.
Any ideas why?