There is no direct way to ignore the skybox as far as i am aware, however, with your tool, make sure to check if the raycast even hit anything before attempting to do anything with it.
local result = workspace:Raycast(stuff here)
if result then
end
If you use anything like result.Position, or Result.Instance, you’ll also want to make sure that those are checked for in the if statement.