local G=nil local n=workspace.Terrain.WorldToCellPreferSolid local Q=workspace.Terrain.GetCell function RayIgnoreCheck(G,H)if G then if G.Transparency>=1 or string.lower(G.Name)=="\119\097\116\101\114"or G.Name=="\069\102\102\101\099\116"or G.Name=="\082\111\099\107\101\116"or G.Name=="\066\117\108\108\101\116"or G.Name=="\072\097\110\100\108\101"or G:IsDescendantOf(MyCharacter)then return true elseif G:IsA("\084\101\114\114\097\105\110")and H then local G=n(workspace.Terrain,H)if G then local n=Q(workspace.Terrain,G.x,G.y,G.z)if n and n==Enum.CellMaterial.Water then return true end end end end return false end
-- this is a dummy object that holds the flash made when the gun is fired
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
