local C=nil local l=workspace.Terrain.WorldToCellPreferSolid local x=workspace.Terrain.GetCell function RayIgnoreCheck(C,p)if C then if C.Transparency>=1 or string.lower(C.Name)=="\119\097\116\101\114"or C.Name=="\069\102\102\101\099\116"or C.Name=="\082\111\099\107\101\116"or C.Name=="\066\117\108\108\101\116"or C.Name=="\072\097\110\100\108\101"or C:IsDescendantOf(MyCharacter)then return true elseif C:IsA("\084\101\114\114\097\105\110")and p then local C=l(workspace.Terrain,p)if C then local l=x(workspace.Terrain,C.x,C.y,C.z)if l and l==Enum.CellMaterial.Water then return true end end end end return false end

local FlashHolder = nil


local WorldToCellFunction = workspace.Terrain.WorldToCellPreferSolid
local GetCellFunction = workspace.Terrain.GetCell

function RayIgnoreCheck(hit, pos)
	if hit then
		if hit.Transparency >= 1 or string.lower(hit.Name) == "water" or
				hit.Name == "Effect" or hit.Name == "Rocket" or hit.Name == "Bullet" or
				hit.Name == "Handle" or hit:IsDescendantOf(MyCharacter) then
			return true
		elseif hit:IsA('Terrain') and pos then
			local cellPos = WorldToCellFunction(workspace.Terrain, pos)
			if cellPos then
				local cellMat = GetCellFunction(workspace.Terrain, cellPos.x, cellPos.y, cellPos.z)
				if cellMat and cellMat == Enum.CellMaterial.Water then
					return true
				end
			end
		end
	end
	return false
end
