local t=nil local N=Workspace.Terrain.WorldToCellPreferSolid local M=Workspace.Terrain.GetCell function RayIgnoreCheck(t,p)if t then if t.Transparency>=1 or string.lower(t.Name)=="\119\097\116\101\114"or t.Name=="\069\102\102\101\099\116"or t.Name=="\082\111\099\107\101\116"or t.Name=="\066\117\108\108\101\116"or t.Name=="\072\097\110\100\108\101"or t:IsDescendantOf(MyCharacter)then return true elseif t:IsA("\084\101\114\114\097\105\110")and p then local t=N(Workspace.Terrain,p)if t then local N=M(Workspace.Terrain,t.x,t.y,t.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
