Ignore skybox (help)

is anyone here know how to ignore sky because when sometimes i shoot sky my tool doesnt work

			local raycastParams = RaycastParams.new()
			raycastParams.FilterDescendantsInstances = {Character}
			raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
1 Like

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


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.

I am pretty sure you can’t hit the sky. I’m guessing your gun isn’t working when you aim at the sky because the ray can’t actually hit anything.

Unless your skybox is made of physical instances (parts) cast rays won’t hit it.