Here is my code in a tool with a handle
tool = script.Parent handle = tool:WaitForChild("Handle") tool.Equipped:Connect(function(mouse) if mouse then mouse.Icon = "rbxassetid://316279304" tool.Activated:connect(function() tool.Firing:Play() local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Part.CFrame.p).unit*300) local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray, {game:GetService("Players").LocalPlayer.Character,tool.Handle}) --if i use just FindPartOnRay and ignore only the player it will work and hit will not be a null value?? if hit then print(hit.Name) else print("Error") end end) end end)