function ProjectileReplication.SendProjectile(u,R,X)local S=RaycastParams.new()S.FilterType=Enum.RaycastFilterType.Blacklist S.FilterDescendantsInstances={Local_Player.Character;workspace.CurrentCamera}local V=workspace:Raycast(R,X*99999,S)local Q=nil if V then Q=PartUtility.GetCharacterFromInstance_R(V.Instance)end RE_CreateProjectile:FireServer(u:GetIDName(),R,X,Q)return V end

function ProjectileReplication.SendProjectile(weaponDefinition, position, direction)
	--print("Sending projectile!",weaponDefinition,position,direction)
	
	local clientRaycastParams = RaycastParams.new()
	clientRaycastParams.FilterType = Enum.RaycastFilterType.Blacklist
	
	-- Ignore the character and the camera which has the first person view model attached
	clientRaycastParams.FilterDescendantsInstances = {
		Local_Player.Character,
		workspace.CurrentCamera,
	}

	local hitResult = workspace:Raycast(position,direction*99999,clientRaycastParams)
	
	local hitCharacter = nil
	
	if hitResult then
		hitCharacter = PartUtility.GetCharacterFromInstance_R(hitResult.Instance)
	end
	
	-- Send to server the request to create the projectile
	RE_CreateProjectile:FireServer(weaponDefinition:GetIDName(), position, direction, hitCharacter)
	
	return hitResult
end
